# Are physics formulas too complicated for automated trading

Are physics models sufficient for algorithmic trading? When I posted this on my Facebook profile, here are some of the commentary I got:

I know all that I still lose in the stock market!

stocks markets are run by understanding simple street wise business sense…. not this sh*t! mostly because those formulas are fu** all to do with markets!…

The magnetic field sometimes works fine!

With the shoddy recent reports of Quantopian, it is quite true that you cannot let computer scientists and mathematicians run a portfolio when they don’t understand how the markets flow.

On the other hand, you could report that recent market making research paper I posted last week shows some validity when trading scenarios around mean reversion may be valid as well. Just call me confused on this one.

Check out this chart here.

As for me, you will be surprised how simple my indicators are for timing forex trades. This includes simple moving average, min max (instead of support and resistance), and ATR for volatility, stop losses, and take profit. It is not that simple but easier than physics.

I am hoping to get these implemented over coming days for the Quant Analytics section.

Once I test this in my live trading environment with Dukascopy Jforex, you can expect a bump in the monthly rate fairly quickly. As a result, you may want to jump on this rate NOW.

Get more benefits here.

Thanks

Bryan

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

# LUA and Kelly Criterion formula

LUA and Kelly Criterion formula
A coding sample

function round4(anum)
return math.floor(anum * 10000) / 10000
end

function kelly_invest(bankroll, winProb, oddsRatio)
local lossProb = 1 – winProb
local kellyPerc = winProb – ((1 – winProb) / oddsRatio)
local recomendInvest = bankroll * kellyPerc
return kellyPerc, recomendInvest
end

function odds_ratio(avgOnWin, avgOnLoss)
return avgOnWin / avgOnLoss
end

function test_kelly()
function kelly_testp(bankroll, winProb, oddsRatio)
kp, ri = kelly_invest(bankroll, winProb, oddsRatio)
print( “kelly — bankroll=” .. bankroll .. ” winProb=” .. winProb
.. ” oddsRatio=” .. round4(oddsRatio) .. ” Kelly Ratio=” .. round4(kp)
.. ” Kelly Investment=” .. round4(ri) )
end

— Convert our Average Win / Loss to a Payout
local avgWin = 185.32
local avgLoss = 210.13
local odr = odds_ratio(avgWin,avgLoss)
print(“avgWin=” .. avgWin .. ” avgLoss=” .. avgLoss .. ” oddsRatio=” .. round4(odr))

— Calcuate Kelly Investment for some test conditions
kelly_testp(1000, 0.56, odr)
kelly_testp(1000, 0.71, odr )
kelly_testp(1000, 0.71, 1.2)
kelly_testp(1000, 0.71, 0.7)
kelly_testp(1000, 0.60, 1.0)
end

test_kelly()

http://bayesanalytic.com/

http://www.albionresearch.com/kelly/default.php

Thanks to Sholom for sending

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

# Kelly Criterion formula walkthru from Excel to C++

I have another demo to show you today. This one is of many that I’m currently working on for both my Forex trading system as well as my glorified pair trading strategy I am rewriting for C++. I’m hoping both will be online in coming months. Any ways I made this video to demonstrate the Kelly Criterion as well as talk about my approach to how I will distribute this trading system.

Go here to see this quick video demonstration

# Quant Elite Annual Membership “Boxing Day” Week Sale

Also, I would like to mention that here in Canada that we have something called the “Boxing Day” sale week. You know, it’s that time of the year when you return all those ugly sweaters that you don’t want so you can get what you want. As a result, I’ve put it on again this week only for my Quant Elite membership. If you get it now, you don’t have to wait until June 2017. Also, I highly doubt you will ever see this discount ever again as I will be moving into more expensive options throughout 2016

Get on this action now

Here are some of the benefits listed

Bryan

P.S. I am doing a LIVE Question and Answer on this Membership in my Year End Trading “wrap” LIVE this Monday night.

Go here for the details

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

# Kelly Criterion formula walkthru from Excel to C++

Kelly Criterion formula walkthru from Excel to C++

Just an example of many formula used for both forex and glorified equities trading

Join my FREE newsletter to learn how this will be implemented for an automated trading system

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

# Think outside the box! Why Black–Scholes–Merton option pricing formula

Think outside the box! Why Black–Scholes–Merton option pricing formula

Thanks to Sholom for sending

Think outside the box but always keep it with you

http://www.ito33.com/sites/default/files/articles/0807_nail.pdf

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

# Quant analytics: Help with 2:1 leverage formula

Quant analytics: Help with 2:1 leverage formula

I am testing a system that calls for using 2:1 leverage when the model is > 3

The problem I am having is when the model is in the 2:1 leverage mode there is a slight tracking error over the intermediate time frame due to compounding.

Can someone recommend a better formula for calculating system equity when testing 2:1 leverage.

Here is the leveraged part of the formula IF(E2=4,((C3*2)+1)*F2

Where
A=date
B=Index
C=rate of change of index
E=The Model
F=System equity

Thanks ahead of time for any recommendations.

do you use Excel? Could you please give your formula in an analytical form, not functional? There’s something in your code that looks strange a bit, so it would be easier to consider it in analytical form and well commented.

yes it is in excel. I have copyed the full formula below. Unfortunately I can’t attach a excel spreadsheet on here. I will try and paste a small section of the spreadsheat though it does format very well. The formula will track the index 2:1 week to week perfectly, but over time it starts to have a slight tracking error. Not by a large amount though.

=IF(E2=2,(C3+1)*F2,IF(E2=0,((D3*0.01)/52+1)*F2,IF(E2=4,((C3*2)+1)*F2,”Not 0, 2, or 4″)))

B C d e g

Where
A=date
B=Index
C=rate of change of index
D=Tibll Rate
E=The Model
F=System equity

let’s put it into an analytical form — that’s what I asked you. You
have something like F = F[1] + C * F[1], where F is system equity on the
current bar, F[1] — the same on the previous bar and C — rate of change on
the current bar. If I got you right, what is the meaning of this formula?

This model switches from t-bills to S&P to 2:1 leverage on the S&P so,
If the model (E) = 0 then buy t-bills
If the model (E) = 2 then Long the S&P with no leverage
If the model (E) = 4 then Long the S&P with 2:1 leverage

OK, do you agree with the analytical form I provided? If yes, what does
this formula mean? If not, what is that you’re trying to implement in
Excel?

B=index
C=(b3-b2)/b2
D= T-bills
E Model Signals ranges from 0-4
f =IF(E2=2,(C3+1)*F2,IF(E2=0,((D3*0.01)/52+1)*F2,IF(E2=4,((C3*2)+1)*F2,”Not 0, 2, or 4″)))

you seem to ignore my efforts to help you. What is the meaning of
multiplying the rate of change by 2 and then adding 1? And then multiplying
it by the previous equity value?

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!