Posted By: Zheka
Accessing component equity curve - 09/25/20 16:02
To 'evaluate' the equity curve of each component (Asset/Algo combination) in a portfolio, I am trying this snippet of code:
This however outputs 0.
1) Is pCurve calculated by Zorro in [Test] mode at all?
2) If yes, is it Daily or Bar-ly?
3) If no, is there another way to access each component's curve (without having to do this manually)?
4) IF this calculation was abolished and component eq.curves are not saved in [Test] - can a flag pls be added to enable maintenance of these by the engine?
Code
#define EqLong (g->statLong->pCurve) // var* pCurve is part of the STATUS struct ; variables.h has this def commented out //#define DailyLong (g->statLong->pCurve) #define EqShort (g->statShort->pCurve) function evaluate() { int nDays = NumBars/(1440/BarPeriod); for(used_assets) { //asset(Asset); algo(Algo); //there is just one algo in a portfolio if (WinLong>0) for (Day=0;Day<nDays;Day++) { print(TO_LOG, "\n EqL[%i]=%.3f", Day, (EqLong+Day) ); } } }
1) Is pCurve calculated by Zorro in [Test] mode at all?
2) If yes, is it Daily or Bar-ly?
3) If no, is there another way to access each component's curve (without having to do this manually)?
4) IF this calculation was abolished and component eq.curves are not saved in [Test] - can a flag pls be added to enable maintenance of these by the engine?