Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, SBGuy, Petra), 801 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Reinvesting Profits #427768
08/13/13 13:14
08/13/13 13:14
Joined: May 2013
Posts: 245
S
swingtraderkk Offline OP
Member
swingtraderkk  Offline OP
Member
S

Joined: May 2013
Posts: 245
Hi all,

I hope you can all please bear with me for this one, but I'm struggling to understand how to safely grow equity. Growing my equity is my objective, as my current equity and returns are too low to allow me to quit my day job. I will become more focused on steady returns when I have achieved sufficient equity to allow me to trade full time.

My discretionary trading (using manual support and resistance levels & ATR on the 1hr charts to try to sell daily tops or buy bottoms with the occasional gap play or breakout) has been profitable for almost 9 months now. I'm getting a 48% win rate with a rr of 1.3.

Every 3 months or so I have broken jcl's golden rules by

1)fully reinvesting my profits i.e. I take the current account balance at that point and use it to break rule number 2.

2) calculate my stake size (I'm a spread better) as a fixed percentage of that balance (full profits included). I do however have a view of how much I want to be in that trade mostly influenced by news and fundamentals, but also on the basis of how strong the support/resistance has been, so I risk a fixed % from .25%, to a max of 2% per trade.

I do not change the balance figure I calculate the fixed percentage from when in drawdown, so when in drawdown, the actual %equity at risk per trade would be higher than the e.g. 0.5% I am using. Also I never revise down the balance figure I calculate stake size from, e.g. if in 3 months time the equity is still in drawdown, I'll reassess in another month. I only increase the balance used to calculate stake size when the real account balance is safely above a growth milestone, I've been using 10% to date.

Drawdown can be worrysome, max drawdown to date was 29%, but this was more due to me tinkering with my entries trying to get higher win rates, but the lost risk reward outweighed all the win rate gains.

I do not doubt jcl's maths about equity growth and fixed percentages leading to margin calls eventually, but considering the step nature of what I do, does this not change things? How different is what I do from someone starting my method 3 months or a year or 5 years later simply with a higher equity? Is everyone doomed mathematically to a margin call? and the higher the starting equity, the sooner it would happen?

Clearly I'm not a mathematician, because there is surely some flaw in the above logic, that does however leave me with the problem of how to grow my equity with a profitable method.

A) If at the next step change, instead of using the new balance figure including full profits, I calculate a new lower balance based on the square root of the profits in the last period, will that remove my mathematical certainty of margin call?

B) Or do I need to adjust it further down to account for the square root of all profits to date and not just in the last period?

C) Does the math tell us anything about how frequently we can safely add on even the square root of profits? per trade, per day, per month, per year, or does it not matter? I know that the frequency of compounding of interest matters.

D) Even if I get a safe method of using a balance, is my method of fixed percentages of any figure dooming me to a margin call?

E) Finally, I'm testing the z strategies at the moment, can anyone explain to me - clearly I'll require an idiots guide - how to use the z strategies sliders to safely grow equity by reinvesting profits? How much and how frequently is it safe to do so consistent either with reliable steady income or with equity growth, but preferably both?


Thanks to anyone who can help me out with this, hope it is in the most appropriate forum.


Last edited by swingtraderkk; 08/13/13 13:15.
Re: Reinvesting Profits [Re: swingtraderkk] #427777
08/13/13 15:36
08/13/13 15:36
Joined: Nov 2012
Posts: 126
B
blaub4r Offline
Member
blaub4r  Offline
Member
B

Joined: Nov 2012
Posts: 126
I'll let jcl answer this more professionally, here is just my take on reinvesting profits:

First of all, I don't know which timeframe these calculations have been made for. If you trade for an extremely long time with reinvesting a fixed percentage of your profits, a margin call will occur sooner or later, I hope that's clear.
Now it's the question what an 'extremely long time' is.
As the Drawdown shown in Zorro Backtests is normalized over three years, you might be fine over that period.
However, if you trade for a very long time with all your accumulated gains at risk at any given time, the probability of you losing everything is quite high. The goal of reinvesting profits with the squareroot-thing is to keep the probability of a marging call independent of the trading period, hence it remains constant.

Here is a comparison:
The important part about reinvesting profits is that when you get a margin call, you lose your start capital and everything you have gained so far. So you probably wasted your last 5 years looking at a rising equity-curve and now its all gone.
The probability of a margin call when you reinvest a fixed percentage of your account balance is the same as when you don't reinvest but withdraw your gains regularly.
In the latter scenario, however, when a margin call happens, the odds are good that you have already withdrawn huge profits that exceed your initial capital. In the first case you lose everything.
You can see the square-root thing as building up a safety net which protects your hard-earned profits.

Hope this helps a bit,

blaubär

Re: Reinvesting Profits [Re: blaub4r] #427782
08/13/13 17:00
08/13/13 17:00
Joined: May 2013
Posts: 245
S
swingtraderkk Offline OP
Member
swingtraderkk  Offline OP
Member
S

Joined: May 2013
Posts: 245
Thanks blaubär,

The timeframe I base my trading decisions on is 1hr, but I auto trade these once a day i.e. set my orders with stops and take profits during morning coffee break GMT, and see how they played out after work at US close 9pm GMT.

I perform much better auto trading than manual trading, boredom leads me to over trade. On days off I now still auto trade and spend the rest of my time learning to program zorro and researching trading systems.

On a daily basis I make an average of 4 trades with a max risk per day of 2.5%, so this method is not high frequency, and there would not be a large number of trades in my lifetime, I'd love to be able to calculate statistically at what number of trades would I have to be at to get 20 losses in a row. At that level a drawdown of 40-50%, alarm bells would be ringing.

Yes, I am clear that an automated strategy, that simply takes a fixed percentage of balance or equity including all profits to date will eventually get a margin call as described clearly in the manual.

The bit I'm unsure of is whether the act of stepping influences this. For significant periods (- months) in my method stake sizes are constant, and are constant during drawdowns. A huge issue as far as I can see with fixed % is that during drawdown periods, the winners shrink when you need them to be full sized most. I don't do this, trusting that the win rate and RR will pull me through.

I'm moving towards accepting the square root, but still confused as to how to step the now smaller increases in stake size, if this is safer, can it be applied daily for example in my method and does it apply to all profit ever earned or only the portion since I last increased it.

I am also confused by the lumpiness of equity injections. Yearly I can invest lumps of new equity into my method, at least until I can ditch the day job. How do I do that safely? How is injecting a €1000 extra equity into my account and trading at higher stake sizes any different than stepping up my stake sizes when I have €1000 profit made over the same period.

Perhaps my objective matters here: I want to trade full time. Withdrawing profits makes no sense when I am saving up money to get to sufficient equity so I can trade full time. When the mythical time arrives and I can safely replace my yearly income with trading income, I will be much less interested in capital growth, and much more interested in steady income and regular withdrawals and then could agree fully with your comparision.

If you inherited 10K from your dear aunt and wanted to use it for trading, would you only trade the square root of it?



Last edited by swingtraderkk; 08/13/13 17:04.
Re: Reinvesting Profits [Re: swingtraderkk] #427786
08/13/13 17:58
08/13/13 17:58
Joined: Nov 2012
Posts: 126
B
blaub4r Offline
Member
blaub4r  Offline
Member
B

Joined: Nov 2012
Posts: 126
Originally Posted By: swingtraderkk

I am also confused by the lumpiness of equity injections. Yearly I can invest lumps of new equity into my method, at least until I can ditch the day job. How do I do that safely? How is injecting a €1000 extra equity into my account and trading at higher stake sizes any different than stepping up my stake sizes when I have €1000 profit made over the same period.


There's no difference if you increase you account size regularly. If you stretch this over several years I would recommend adjusting the new margin with the square-root-calculation.

The thing with the 10k:
If you really want to invest all of it then do it as you would invest different amounts of money, too. But keep in mind that you might lose it.

To clarify: I don't think you should invest the whatever percentage of your money if this does not take your capital requirements into account. Even investing the square-root of your profits can ruin you if this makes your margin grow faster than your equity (At least at the beginning). This is handled by the OptimalFs. You should not forget them.
The point of the square-root-calculation is that your margin grows slower than your equity.

Re: Reinvesting Profits [Re: swingtraderkk] #427788
08/13/13 18:17
08/13/13 18:17

A
acidburn
Unregistered
acidburn
Unregistered
A



Thanks for starting this very interesting topic, swingtraderkk! It's so interesting, that I bookmarked it immediately, based only on your first post, to come back read later when I finally acquire knowledge needed to answer some of the very interesting questions you open.

Now, I'm still learning about lots of important money management concepts, I'm fitting the pieces of the puzzle in my mind, so to say. But, it will take a while before I can say I even grasp the general concepts, let alone master the subject.

jcl has obviously made his homework and shared with us some usable general conclusions, but it's up to us to understand them completely and apply them properly. And this all is even more important if you plan to live just off of trading profits. I'd say, don't ever do that (quit the day job) before you really have all of your questions answered. And able to recite them seamlessly when woken up in the middle of the night.

Now, *if* we're to take jcl's "don't ever reinvest more than square-root of your profits" advice as granted, I guess (i.e. I'm not yet sure) we could translate it to "risk a fixed sum (not percentage!), and draw only a square-root of your profits, and you should be fine". Then, depending on the profitability of your strategy and your expected monthly expenses, you should be able to roughly estimate the needed starting capital for all this to work and you be able to quit your day job. That's how I see it, currently.

Of course, you'd also need to build in lots of safety margins, because market can surprise you, and your strategy can be 3 months in drawdown, but you still need to eat and pay for the electricity all that time, right? So the starting capital needed could be much larger than calculated by naive mathematics formulas, to provide cushion in adverse times.

Nassim Taleb's books are good if you wan't to be scared s**tless of the market. You get to see your boss in another light after you read what Nassim has to say. grin

Re: Reinvesting Profits [Re: ] #427829
08/14/13 11:09
08/14/13 11:09
Joined: May 2013
Posts: 245
S
swingtraderkk Offline OP
Member
swingtraderkk  Offline OP
Member
S

Joined: May 2013
Posts: 245
Thanks guys.

One thing I have noticed is that I never think of margin as I'm a spread better, and my bets are always low percentages of my balance. I look occasionally at my margin figure but my used margin to free margin ratio is 1:13, and rarely under 1:10.

Spread betting does not work in lots per trade, it is a bet. You bet €x per pip movement. So each trade I enter I calculate my bet size (x) by dividing my stop in pips into e.g. 1% of my current balance figure. Therefore in zorro terms, I use the risk method to calculate volume.

Code:
The trade volume - the number of contracts or currency units purchased - can be determined in three different ways. For directly ordering a certain number of contracts, use Lots. For investing a certain amount of your account balance, use Margin. For risking a certain amount by determining the worst case loss, use Risk.



Does this risk approach influence the inevitable margin call logic?

Am I using too little of my margin at present and therefore safe to continue?

Should I be using more of my margin currently, but be much more conservative in increasing margin per trade with reinvested profits?

@blaub4r

Thanks I'm getting a lot clearer in thinking in margin terms. The vicious spiral here is that during drawdowns, equity decreases and margin as % of equity rises rapidly.

@acidburn

Quote:
Now, *if* we're to take jcl's "don't ever reinvest more than square-root of your profits" advice as granted, I guess (i.e. I'm not yet sure) we could translate it to "risk a fixed sum (not percentage!), and draw only a square-root of your profits, and you should be fine"


This is the kernel of my problem. I can absolutely agree with the sentiments above, but in my method I am risking a fixed sum but crucially it is a fixed sum only for a period. At the end of a successful period, I reset that fixed sum to a new higher fixed sum. e.g.

Q1 Starting a/c balance 10,000
5 categories of trades .25%, .5%, 1%, 1.5%, 2%
Max risk per trade 25, 50, 100, 150, 200

Irrespective of drawdown, risk per trade remains the same.

Q2 Starting balance 11,000
5 categories of trades .25%, .5%, 1%, 1.5%, 2%
Max risk per trade 27.5, 55, 110, 165, 220

Irrespective of drawdown, risk per trade remains the same for this period.

Q3 Starting balance 9,000

No change to fixed amts per trade, until I get closed balance of 12,000 then new period of fixed amts:

5 categories of trades .25%, .5%, 1%, 1.5%, 2%
Max risk per trade 30, 60, 120, 180, 240

Does the resetting and fixing for a period make this safer, or is it still doomed to margin call unless I use a square root or similar method to control even the step changes.

I have calculated what I need to safely only trade. As you have correctly highlighted, this figure needs numerable safety margins and even so has been significantly revised higher the more I learn and the more experienced I get.

Quote:
You get to see your boss in another light after you read what Nassim has to say. grin


There is no other light for my boss ;-)

Last edited by swingtraderkk; 08/14/13 11:11.
Re: Reinvesting Profits [Re: swingtraderkk] #427851
08/14/13 14:18
08/14/13 14:18
Joined: Nov 2012
Posts: 126
B
blaub4r Offline
Member
blaub4r  Offline
Member
B

Joined: Nov 2012
Posts: 126
Originally Posted By: swingtraderkk

Does the resetting and fixing for a period make this safer, or is it still doomed to margin call unless I use a square root or similar method to control even the step changes.


Unfortunately, I think so (underlined part).
If you cannot make friends with the square-root thing you can try to withdraw some of your profits regularly and calculate your new risk settings based on the new equity.
Likewise, you can decrease your risk settings when in DD, this should flatten out your DDs, but might reduce your profit.
However, if you keep doing this for a long time you might loose everything when caught in a huge DD, as the max DD increases over time.

Re: Reinvesting Profits [Re: blaub4r] #428113
08/18/13 08:07
08/18/13 08:07
Joined: Apr 2013
Posts: 57
3
3DCat Offline
Junior Member
3DCat  Offline
Junior Member
3

Joined: Apr 2013
Posts: 57
There's a huge difference between fixed percentage and square root. What do you guys think of calculating reinvesting profits with something like margin+=pow(profits,0.7)?

Re: Reinvesting Profits [Re: 3DCat] #428157
08/19/13 10:03
08/19/13 10:03
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
The square root is the reinvestment ratio for a strategy that just breaks even. More profitable strategies can indeed use a higher ratio.

Unfortunately the formula becomes then a little more complicated, as it's a logarithmic sum and requires knowing the gain. This makes it somewhat less practical. You can find details in this paper:

http://www.cs.rpi.edu/~magdon/talks/mdd_NYU04.pdf

Re: Reinvesting Profits [Re: jcl] #428166
08/19/13 12:24
08/19/13 12:24
Joined: May 2013
Posts: 245
S
swingtraderkk Offline OP
Member
swingtraderkk  Offline OP
Member
S

Joined: May 2013
Posts: 245
Thanks jcl,

I'll try to understand the paper above, initial scans would not be promising on that score.

How do the large funds manage equity injections as opposed to profit reinvestment?


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1