Home › Forums › Trading System Mentor Course Community › Progress Journal › Still in cash :-)
- This topic is empty.
-
AuthorPosts
-
November 14, 2019 at 9:20 pm #110573Stephen JamesMember
Save into the report charts folder in AB
Code:eqname = “~~~EQUITY”;
if( Name() != eqname ) SetForeign( eqname );
eq = Close;bslh = HighestBars(eq);
MaxWaitBars = Highest(bslh);
Plot(bslh, “#bars since last high”, colorred, styleHistogram, 0, 10 * LastValue( Highest( bslh ) ) );
Plot(MaxWaitBars, “Max Wait Bars”, colorBlue, styleline);November 14, 2019 at 10:43 pm #110574MichaelRodwellMemberThanks Craig.
I credit this to someone else on the forums but my understanding is that you need to number the reports. Once you drop down the Reports Charts folder in the charts tab you will see they are numbered. Another one that I got from a user on here (sorry who ever it was!) is an enhanced profit table. Code below.
Code:EnableTextOutput( 3 ); // enable HTML output into report (Version 5.84 or higher!)function CalendarDays()
{
ddsince1900 = DaysSince1900();
result = ddsince1900 – ddsince1900[0];
return result;
}// — MaxDD —
EQ = C;
MaxEQ = Highest( EQ );
DD = EQ – MaxEQ;
MaxDD = Lowest( DD );
DDpct = 100 * ( EQ – MaxEQ ) / MaxEQ;
MaxDDpct = Lowest( DDpct );// — CAR —
bi = BarIndex();
fbr = Status( “firstbarinrange” );
lbr = Status( “lastbarinrange” );
fbrbi = LastValue( ValueWhen( fbr, bi ) );
lbrbi = LastValue( ValueWhen( lbr, bi ) );
cd = CalendarDays();
Days = cd[ lbrbi ] – cd[ fbrbi ];
CAR = 100 * ( ( eq / eq[ fbrbi ] ) ^ ( 365 / Days ) – 1 );fillText = StrFormat( ” “);
Title = StrFormat( “Equity = $ %.2f%%, CAR = %.2f%%, MaxDD = $ %.2f%%, (= %.2f%%)”, EQ, CAR, MaxDD, MaxDDpct );
SetGradientFill( colorDarkGreen, ColorRGB( 0, 204, 0 ), 0 );
Plot( EQ, “Portfolio Equity”, colorDarkGreen, styleGradient | styleLine );
// — drawdown trenches in red —
PlotOHLC( MaxEQ, MaxEQ, EQ, MaxEQ, “”, colorRed, styleCloud );// — paint log graph —
SetChartOptions( 2, chartLogarithmic );////////////////////////////////////////////////////////////////////////////
////////////////////////////
// From: 3. Profit Table.afl
////////////////////////////yr = Year();
mo = Month();YearChange = yr != Ref( yr, 1 );
MonChange = mo != Ref( mo, 1 );FirstYr = 0;
LastYr = 0;startbar = 0;
////////////////////////////
// SKIP non-trading bars
////////////////////////////for ( i = 0; i < BarCount; i++ ) { if ( eq[ i ] ) { startbar = i; break; } } //////////////////////////// // collect yearly / monthly changes in equity // into dynamic variables //////////////////////////// LastYrValue = eq[ startbar ]; LastMoValue = eq[ startbar ]; MaxYrProfit = MinYrProfit = 0; MaxMoProfit = MinMoProfit = 0; MaxYearEQ = YearDD = MaxYearDD = 0; for ( i = startbar + 1; i < BarCount; i++ ) { MaxYearEQ = Max( EQ[ i ], MaxYearEQ ); YearDD = Nz( 100 * ( EQ[ i ] - MaxYearEQ ) / MaxYearEQ ); MaxYearDD = Min( YearDD, MaxYearDD ); if ( YearChange[ i ] || i == BarCount - 1 ) { Chg = 100 * ( -1 + eq[ i ] / LastYrValue ); VarSet( "ChgYear" + yr[ i ], Chg ); MaxYrProfit = Max( MaxYrProfit, Chg ); MinYrProfit = Min( MinYrProfit, Chg ); if ( FirstYr == 0 ) FirstYr = yr[ i ]; LastYr = yr[ i ]; LastYrValue = eq[ i ]; VarSet("MaxYearDD"+ yr[ i - 1 ], MaxYearDD ); MaxYearEQ = YearDD = MaxYearDD = 0; } if ( MonChange [ i ] || i == BarCount - 1 ) { mon = mo[ i ]; Chg = 100 * ( -1 + eq[ i ] / LastMoValue ); VarSet( "ChgMon" + yr[ i ] + "-" + mon, Chg ); VarSet( "SumChgMon" + mon, Chg + Nz( VarGet( "SumChgMon" + mon ) ) ); VarSet( "SumMon" + mon, 1 + Nz( VarGet( "SumMon" + mon ) ) ); MaxMoProfit = Max( MaxMoProfit, Chg ); MinMoProfit = Min( MinMoProfit, Chg ); LastMoValue = eq[ i ]; } } MonthNames = "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec"; function GenProfitTableHTML( ) { printf( "
n” );
printf( “
n” ); Header = “Year,” + MonthNames + “,Yr%%,” + “MDD”;
for ( Col = 0; ( Colname = StrExtract( Header, Col ) ) != “”; Col++ )
{
printf( “” + Colname + “ ” );
}printf( “
n” );
for ( y = FirstYr; y <= LastYr; y++ ) { //Color = ColorRGB( IIf( row == 0 || col == 0 || col == 13, 220, 255 ), 255, IIf( row % 2, 255, 220 ) ); // new row if ( y % 2 ) printf( "
n ” );
else
printf( “n ” ); printf( “%g
“, y );
for ( m = 1; m <= 12; m++ ) { Chg = VarGet( "ChgMon" + y + "-" + m ); if ( NOT IsNull( Chg ) ) { if ( Chg >= 0 )
printf( “%.1f%% “, Chg );
else
printf( “%.1f%% “, Chg );
}
else
printf( “N/A ” );
}if ( y % 2 )
printf( “” );
else
printf( “” ); x = VarGet( “ChgYear” + y );
z = VarGet(“maxYearDD” + y );if ( x >= 0 )
printf( “%.1f%%“, x );
else
printf( “%.1f%%“, x );
Printf( “%.1f%% “, z );
printf( “n” ); // end row
}printf( “
n” ); // new row printf( “
Avg|Mx ” );
for ( m = 1; m <= 12; m++ ) { x = Nz( VarGet( "SumChgMon" + m ) / VarGet( "SumMon" + m ) ); if ( x >= 0 )
printf( “%.1f%% “, x );
else
printf( “%.1f%% “, x );
}
if ( CAR[ BarCount-1 ] >= 0 )
printf( “%.1f%% “, CAR[ BarCount-1 ] );
//PrintInCell( StrFormat(“%.1f”, CAR[ BarCount-1 ] ), Row, 13, ColorRGB( 255, 128, 0 ) );
else
printf( “%.1f%% “, CAR[ BarCount-1 ] );
//PrintInCell( StrFormat(“%.1f”, CAR[ BarCount-1 ] ), Row, 13, ColorRGB( 0, 204, 0 ) );
printf( “%.1f%% “, MaxDDpct[ BarCount-1 ] );
//PrintInCell( StrFormat(“%.1f”, MaxDDpct[ BarCount-1 ] ), Row, 14, ColorRGB( 255, 255, 0) );
//printf( “” );
printf( “
n” );
}
///////////////////////////
// This function checks if currently selected symbol
// is portfolio equity
//////////////////////////
function CheckSymbol()
{
if ( Name() != “~~~EQUITY” AND Name() != “~~~OSEQUITY” )
{
printf( “For accurate results switch to ~~~EQUITY symbol
” );
}
}CheckSymbol();
////////////////////////////
// Main program
////////////////////////////
GenProfitTableHTML();November 15, 2019 at 12:08 am #110575AnonymousInactiveCraig and Mike, both great! thank you!
November 15, 2019 at 2:10 am #110571ScottMcNabParticipantDo you feel data before 2002 not applicable any more Mike ? What are your thoughts re the dates for the backtest ? 90’s were amazing so can inflate the stats but nice to see how it comes thru the dot.com
November 15, 2019 at 2:21 am #110578MichaelRodwellMemberNovember 15, 2019 at 6:32 am #110579ScottMcNabParticipantThanks Mike…run it and see if it looks “less ugly” on US ? Last decade post GFC has not been quite as amazing just about anywhere as it has been in USA
November 15, 2019 at 6:53 am #110580MichaelRodwellMemberNot sure why I kept that subject line…
What universe you want me to try? Any specific?
November 15, 2019 at 9:45 am #110581#REF!McGrathParticipantHi Mike, how was the performance on the ASX100?
November 15, 2019 at 7:49 pm #110582ScottMcNabParticipantMichael Rodwell wrote:Not sure why I kept that subject line…What universe you want me to try? Any specific?
Nah…just thought the difference in the decades 2000-09 and 2010-19 may well be reflection of ASX performance rather than your system…maybe SPX
November 16, 2019 at 6:09 am #110583MichaelRodwellMemberQuote:Hi Mike, how was the performance on the ASX100?Gavin: With 5 positions on the ASX100 I can get similar performance. Around 16.5% CAR and 20-22% DD. I’m specifically looking to get exposure to smaller companies as they have lagged the broader market. This is an attempt for me to be smart but I discussed it with Nick and concluded that if the overall market takes off due to QE, low interest rates etc, the small and mids will start to fire and are coming from a lower base than the ASX100 with is performing well at the moment.
November 16, 2019 at 6:16 am #110584MichaelRodwellMemberQuote:Nah…just thought the difference in the decades 2000-09 and 2010-19 may well be reflection of ASX performance rather than your system…maybe SPXWithout tweaking it at all it does pretty ordinary…
15% CAR, 30% DD…
November 16, 2019 at 7:13 am #110586ScottMcNabParticipantMichael Rodwell wrote:Quote:Nah…just thought the difference in the decades 2000-09 and 2010-19 may well be reflection of ASX performance rather than your system…maybe SPXWithout tweaking it at all it does pretty ordinary…
15% CAR, 30% DD…
Personally don’t think anything wrong with that…think the tweaking can over-inflate expectations sometimes…solid returns on data never seen
November 16, 2019 at 6:57 pm #110587MichaelRodwellMemberYeah fair point. I’d feel pretty comfortable with some price and volume filters and looking at the regime filter. Actual momentum ranking and core system components on that back test is identical.
30% DD is the highest I’ve experienced in the past and don’t particularly want to go back there too soon! Not until I have a few more wins in the bag!
November 30, 2019 at 4:01 am #110590MichaelRodwellMemberBuy the Bulls Monthly Momentum
=> May: -7.79
=> June: +5.49
=> July: -0.54
=> August: -0.18
=> September: -1.72%
=> October: +3.46%=> November: + 0.46
YTD: -1.35%
Still grinding away while I sit on my hands. Onwards and upwards or xmas please!
December 6, 2019 at 3:08 am #110623MichaelRodwellMemberI’ve been doing more testing, tinkering and experimenting with my ASX100 momentum system.
So far things are looking pretty good. I’ve been on a journey from relatively simple, to complex and back to really really simple.
I decided to test a lot of things I thought I already knew the answers to in predominantly 3 areas:
– Regime/ Index filter
– Momentum ranking
– Stock FilterOne of the major things I have been trying to overcome is the wait time for new equity highs. In my past attempts I could get reasonable results over a 20 year period but their were some instances where the system was in draw down for more than 1000 days.
Here’s where I’ve got to now…
-
AuthorPosts
- You must be logged in to reply to this topic.