Hello! I am impressed with the zorro software, i discovered it 2 weeks ago, and i am trying to get used to it, and test before buying, but today i am very disapointed.
I open the inbluid BuyHold.c strategy, test, and get results, but Annual growth rate is wrong, it tells 26.76%, but it is not, it is more like 15% CAGR (from 117 to 637 in 12 years)
Test period 2013-01-03..2025-07-28 (3159 bars)
I download the data from mi IB account (SPY.t6), and seem fine, in the chart i can see prices are rigth, first price 117, last price 637
I attatch some secreens, but you can try by yourself.....
You miscalculated CAGR. I approximated values based on the blue chart, and assuming a starting value of $10k, an ending value of $195k, and a number of periods = 13 years, that gives you a CAGR of about 26%.
But i can not understand how if SPY went from 117 to 637 , and how just Buy and hold can lead you from 10k to 195k, because in the BuyHold.c i cant see leverage.
The strategy must buy $10k SPY at 117 (10k/117=85shares), and at the end we must have 85*637=$54145, that is 15%
I think i still thinking or doing somethink wrong in my maths, or something else that i cant see..... but i do not know what it is,
For example the strategy won 119% in 2013 but SPY just won 32%, seem a 3.7 leverage but it is not in de code
Last edited by Estotrader; 07/30/2508:55. Reason: bad orthographic
Ernesto "Estorader" Options Trader
Re: Wrong AGR caculation on BuyHold.c
[Re: Estotrader]
#488835 07/30/2512:0507/30/2512:05
Seem things are more clear to me, after uncommented USE_CDF, thanks
Abusing your kindness, now, new questions surges to me . 1-No matter Capital=Number is, strategy go long 128*SPY, of course i can write enterlong(desired_amount), but enterlong() invoque 128*SPY, i am confused why 128, but i can solve entering desired amount in enterlong()
2-MaxDardown row in BuyHold.txt are forever= XXXX 0.0% (YYYY MAE 22.9%). I mean, Capital (the variable) can be 10k or 1000k but Maxdrawdown holds in 0.0% (MAE 22.9%), MAE have no sense for me, i understand if SPY had a -33% in 2020, MAE at least should have -33%, guessing MAE is just for the capital invested in SPY. For me the desirable MAE or MaxDarwdowm calculation would be from all equities+cash Top to all equities+cash bottom, i mean the usual MaxDrawdown of te whole thing.
At least Capital (the variable) is taken to calculate the CAGR as desirable, and also CAGR calculaltion is rigth, as it takes the Capital in cash left + the capital invested in SPY. Thanks in advance
Ernesto "Estorader" Options Trader
Re: Wrong AGR caculation on BuyHold.c
[Re: Estotrader]
#488837 07/30/2516:3807/30/2516:38
1 - In your code, lot size is set by Margin. Details about different ways to size lots are in the manual. 2 - "Drawdown" observes changes in balance, whereas MAE observes changes in equity. This is a buy and hold operation, so balance is static until the trades close. Meanwhile, equity is variable.
1-Perfect, i have to study that part, but have sense
2-I understand now Drawdown = just balance, but the MAE percentage is calculated in total shares bougth, so if you chage cuantity in the enterlong(); at the file 50 of the BuyHold.c script you get this:
enterLong(50); // Outcomes in BuyHold.txt--> Max drawdown -10.72$ 0.0% (MAE -5739$ 23.1%) enterLong(150);// Outcomes in BuyHold.txt--> Max drawdown -32.17$ 0.0% (MAE -17217$ 23.1%)
So really MaxDrawdown and MAE is changing in amount but not in percentage. I understand Zorro is thougth like that, but as i need to take care of maxdrawdwon in real time in my code, i will need to code some "real whole drawdown entire profolio+assets+cash at this moment not waiting trades are closed" in order to check the "real" drawdown of the thing.
function RealDrawdownNow_in_percentage() // I must code this
Many thanks, still fighting with zorro dayly , i gues i will get it with time, Zorro is impresive but for a newbie like me, something are still dificault to understand