Australian (ASX) Stock Market Forum

TradeSim

Hi,

Im having trouble understanding how TradeSim calculates risk for position sizing.

I have specified 1.5% fixed percent risk. Im starting with $46,000.

What does that mean?
1.5% of capital in the bank or 1.5% of total equity (open plus closed) ?

Now on the first scan of my simulation for one of my backtests i picked up 10 entry signals.

So the following bar (week), i bought 10 stocks.

My thinking was that, say i bought 1 stock, 1.5% risk is $690.
So I risk $690 on the FIRST TRADE. Say the amount of capital allocated to this one trade calculated from the fixed risk was $5000.

Doesnt that mean that the 2nd trade (on the same bar/week) should be calculated using 1.5% of ($46,000-$5,000)= $41,000 ??

Tradesim doesnt seem to calculate it this way.
It seems like if all the stocks are entered on the same bar, then the risk is not adjusted after each position. It's about $680-690 for each of the 10 positions.
 
Above question has been answered and all is good in terms of position sizing.

Now another question....

Using the SetVariableTradeRank function, is there a way to tell TradeSim to give preference to lower priced shares over higher priced shares?

Im not after a set dollar value ie. shares under $10, (because obviously there's alot more stocks now with a price above $10 then, say, 4 or 5 years ago) but rather a relative measure.

Thanks.

Nizar.
 
Nizar,

Have you tried the ATR(10) example (eg 2) as shown on page 115 of the TS manual and if so how did it affect the results?
 
Hi,

Im having trouble understanding how TradeSim calculates risk for position sizing.

I have specified 1.5% fixed percent risk. Im starting with $46,000.

What does that mean?
1.5% of capital in the bank or 1.5% of total equity (open plus closed) ?

Now on the first scan of my simulation for one of my backtests i picked up 10 entry signals.

So the following bar (week), i bought 10 stocks.

My thinking was that, say i bought 1 stock, 1.5% risk is $690.
So I risk $690 on the FIRST TRADE. Say the amount of capital allocated to this one trade calculated from the fixed risk was $5000.

Doesnt that mean that the 2nd trade (on the same bar/week) should be calculated using 1.5% of ($46,000-$5,000)= $41,000 ??

Tradesim doesnt seem to calculate it this way.
It seems like if all the stocks are entered on the same bar, then the risk is not adjusted after each position. It's about $680-690 for each of the 10 positions.


Above question has been answered and all is good in terms of position sizing.

Nizar,

Out of interest what was the conclusion to this?
 
Nizar,

Out of interest what was the conclusion to this?

Email response from David:

1.5% of the total trading pool which consists of available cash plus money allocated to existing trades.

When trades are closed out then profits/losses are added to the trading pool if pyramid profits is enabled, otherwise the trading pool is maintained at the Initial capital and any profits are added to the bank.

It seems like if all the stocks are entered on the same bar, then the risk is not adjusted after each position. It's about $680-690 for each of the 10 positions.

Yes this is true and is refelected in the portfolio heat. Otherwise trades entered first would be exposed to higher risk and there would be an uneven distribution of risk for a given set of trades entered on the same bar. TradeSim allows you to adjust the portfolio heat limit to limit the total risk exposure if need be.

regards
david
 
It seems like if all the stocks are entered on the same bar, then the risk is not adjusted after each position. It's about $680-690 for each of the 10 positions.

Yes this is true and is refelected in the portfolio heat. Otherwise trades entered first would be exposed to higher risk and there would be an uneven distribution of risk for a given set of trades entered on the same bar. TradeSim allows you to adjust the portfolio heat limit to limit the total risk exposure if need be.

regards
david

Nizar / Other Tradesim users,

But surely this doesn't really mimic what will happen in real-life? As one places each trade, shouldn't the risk be readjusted regardless of if they are all being placed on the same day or am I missing something here? :confused:

If Tradesim only calculates risk in this manner, is there any other way to code it so that it more closely follows what would happen in real-life?
 
Chorlton
The diminishing risk method you suggest, besides being complex to implement, would vary position size depending on what order the trades are taken in. This makes no sense to me.

Unless I misunderstand the question Tradesim is as close to real life trading as you can get. I have no difficulties mimicing this strategy when actually trading.

stevo
 
Chorlton.

At the beginning it confused me too, but think about it.
There's no reason why you should allocate more or less risk to stocks which trigger entries on the same bar.

David explained it nicely.
 
Nizar,

Any danger of a response?

LOL.

Well no i didnt try it.
But at your request, i will, ok brother.
Just gimme a sec.

Do you want me to give preference to lower ATR stocks to higher ones?

Let me know and i'll run it through.

Cheers.
 
Ok. I just ran it through with Ranking to give the highest value first, giving preference to stocks with higher volatility.

Actually its quite an interesting excercise as I expect the results through this ranking would be better than the alphabetically sorted simulations.

Well the results are in.

Inconclusive at best.

From 50 simulations, 30 (60%) have generated annual returns greater than the average of the monte carlo results.

Only 4 (8%) generated annual returns that were significantly greater (more than 5%p.a.) than the average of the monte carlo results.

60% isnt that far away from 50% so if I ran maybe 50 more runs then it would show that this method of ranking provides no benefit.

Ranking by price (lower priced first) gives a substantial boost and conclusive results that proves that this method is likely to generate returns to the higher end of the monte carlo results.

The details are on my blog.

Before I get corrected on this, i'll just say all it means is that this method would've outperformed alphabetical sorting when applied IN THE PAST. Backtesting is not perfect but like Iv said before, its the best tool we have, and applied correctly, can give us a good idea of how a system is likely to perform (not a perfect idea of exactly how a system will perform).
 
I think the answer lies Nizar in where your entry sits relative to the life of the chart.

What Ive found with T/T is those stocks which have their initial buy which coincides with a point in the chart which lends itself to a longer term move end up more profitable than those which are (at the point of the initial buy) getting near the end of a longer term move.

See buy triggers can and do come at various points in the life of a stock.
Sure we can attempt to code these filters,but in the end Ive found I cant code intuition.That ability of the brain to look at a chart and have that feel of opportunity.Just as you can have that feel of pending or continuing disaster.

Thats why I like to "eyeball" my potential buys triggered from a system.
Ive had 4 or more and not taken any.

Many would say I'm adding a discretionary component to the system.
I disagree,here is why.

My testing particularly Monte carlogives me a range which I can expect my system to perform.REGARDLESS of which stocks I choose I can expect the results to fall in there somewhere.
Quite possibly my intuition plays no part in the performance of my trading,it could just be luck.To me it doesnt matter,if Im happy with the lowest end of the scale in the returns of my system then I'm happy to be deluded or accept the luck that comes my way,as I can expect at least the lowest end---anything better is a bonus.
 
Yeh I agree tech/a.

I was looking for a systematic method that will give returns to the higher end of monte carlo analysis simulations. And I think I may have found it. Through buying lower priced stocks.

And I agree that the DISTRUBUTION of the results is what is most important.

I was explaining this to a mate the other day who couldnt understand all those specs i was missing out on because of my liquidity filter!
(As the system wouldnt have picked up EVE or BMN, or many other champion specs)

I told him If I traded the whole market with no liquidity filter, the best portfolio wouldve turned his $30k into about $10million over 6years while the worst would ended up about $20k in the red.

Not the sort of system we'd like to trade thats for sure.
 
Nizar,

Have you tried the ATR(10) example (eg 2) as shown on page 115 of the TS manual and if so how did it affect the results?

Thanks for your response.

Do you want me to give preference to lower ATR stocks to higher ones?

and

Ranking by price (lower priced first)

Would you please tell me how you coded these requirements?

With thanks,
rnr
 
Hi rnr.

As for the MS coding.
I wrote exactly what it on pg.115 of the TradeSim manual.

ExtFml( "TradeSim.SetVariableTradeRank",ATR(10));

Under the call to initialise function.

Then under TradeSim global preferences I specified it to Rank from highest to lowest, this giving preference to trades where the ATR is the highest.

So now the trade database is first sorted by date, and then by volatility, with the most volatile stocks (measured by ATR) given a higher rank.

If you want to Rank from lowest to highest, then you can just choose this option under TradeSim global preferences.

I hope it helps, though i probably made a mistake somewhere in there!

Regards,
Nizar.
 
Chorlton.

At the beginning it confused me too, but think about it.
There's no reason why you should allocate more or less risk to stocks which trigger entries on the same bar.

David explained it nicely.


Yep Fair Point.... Took a little while to sink in... :eek:

Cheers Stevo & Nizar.......
 
Isn't that ranking by volitility, not by price? I would think by price would be ExtFml( "TradeSim.SetVariableTradeRank",Close);

SB

Hi SB.

Thanks for your post.

I did 2 tests.
One with ranking by price (using the formula above).
The second one using volatility (using my formula).

Details on my blog. But suffice to say, ranking by price gave much better results.

Oops i just realise i didn't understand rnr's post.
Yeh well i did 2 tests ie. tested price THEN volatility seperately.

Cheers.
 
Im having a bit of trouble getting my head around something.

When i want to test to see the difference the ranking (the trades) makes, i do a single portfolio simulation several times.
Obviously I cant do a monte carlo on this because this will disregard the ranking.
So, each of these times I do a single portfolio run, I find the results are different. Why?

Because selection is not random anymore (like monte carlo) but rather im instructing tradesim to always buy lower priced stocks first, so each time the simulation is run shouldn't the results be exactly the same?

Due to the ranking, doesnt this mean that theres always only one possibility and one possible route to trade?

Im sure the answer is simple but I just can't get my head around it right now.

Any thoughts?

Thanks,
Nizar.
 
Im having a bit of trouble getting my head around something.

When i want to test to see the difference the ranking (the trades) makes, i do a single portfolio simulation several times.
Obviously I cant do a monte carlo on this because this will disregard the ranking.
So, each of these times I do a single portfolio run, I find the results are different. Why?

Because selection is not random anymore (like monte carlo) but rather im instructing tradesim to always buy lower priced stocks first, so each time the simulation is run shouldn't the results be exactly the same?

Due to the ranking, doesnt this mean that theres always only one possibility and one possible route to trade?

Im sure the answer is simple but I just can't get my head around it right now.

Any thoughts?

Thanks,
Nizar.

Problem solved.
The variability was due to the slippage (market orders).
 
Top