- Joined
- 28 December 2013
- Posts
- 6,392
- Reactions
- 24,319
PANDA certainly looks like another impressive addition to the stable Skate! How are you doing those extended Backtest stats including Expectancy please - guessing they are custom user metrics coded onto your reports?
How are you doing those extended Backtest stats including Expectancy please - guessing they are custom user metrics coded onto your reports?
/* First we need to enablecustom backtest procedure and
** tell AmiBroker to use current formula
*/
SetCustomBacktestProc("");
/* Now custom-backtest procedure follows */
if( Status("action")== actionPortfolio )
{
bo = GetBacktesterObject();
bo.Backtest(); // run default backtest procedure
SumProfitPer100Inv = 0;
NumTrades = 0;
// iterate through closed tradesfirst
for(trade = bo.GetFirstTrade(); trade; trade = bo.GetNextTrade() )
{
// here we sumup profit per $100 invested
SumProfitPer100Inv = SumProfitPer100Inv + trade.GetPercentProfit();
NumTrades++;
}
// iterate through eventually still open positions
for(trade = bo.GetFirstOpenPos(); trade; trade = bo.GetNextOpenPos() )
{
SumProfitPer100Inv = SumProfitPer100Inv + trade.GetPercentProfit();
NumTrades++;
}
expectancy2 = SumProfitPer100Inv / NumTrades;
bo.AddCustomMetric( "Expectancy (per $100 inv.)",expectancy2 );
}
// your trading system here
fast = Optimize("fast", 12, 5, 20, 1 );
slow = Optimize("slow", 26, 10, 25, 1 );
Buy=Cross(MACD(fast,slow),Signal(fast,slow));
Sell=Cross(Signal(fast,slow),MACD(fast,slow));
There’s No Time Like Today
“The best time to plant a tree was 20 years ago. The second best time is now.” — Chinese proverb
Meaning, it isn’t too late to start..
Start what?
That's for you to decide.
Skate.
One way i found this custom backtest useful was adding a cause of exit if using trailing stopno problem mate. I have had it coded ( and the other examples ) for a while but not really used it.
Looking at Skate's report has given me some ideas on other parameters to add but just haven't pulled the trigger yet.
View attachment 99582
In a thread as long as this one it's a pity I can't bookmark the posts I may want to reference in the future.
A lot of interesting talk this week and a pretty disappointing/bad end result for the systems today I know there is so much to fix that I feel pretty tempted to stop system 2 and flipper.
System1 lost a whooping $829 on a week which saw the asx surge I have to get into the details and check which shares produce that and see if there is a fundamental fault I can spot and system2 got a minimal $108 profit Flipper lost another $342 and does have a single (slightly) positive position out of 5!!!!!
Pathetic..
Yes, that is disappointing with 15 open positions in the Sys 1 portfolio. I'd love to help but unfortunately I don't use Amibroker nor could I evaluate your system code. 13/14 positions in the P2 wkly/dly portfolio went up this week and I'm certain @Skate portfolios would show the same pattern.
@debtfree My humblest apologies. I must have read your post as I liked it. I didn't test it straight away and forgot about it. I'm going to bookmark @Skate CAM, MAP, BOX, HYBRID, PANDA strategies, exit discussions and even his secret sauce.
View attachment 99612 Skate will wonder what's hit him.
When I develop a strategy - "consistency" - is the main measure - profit performance 'not so important' as there is a direct correlation between consistency & performance, meaning get the consistency right & the performance naturally follows.
I'm not a lover of pyramiding into a position or adding to an existing position (others can argue the case for pyramiding but with a "Take Profit Stops" or "Pyramiding" neither work for me) Moreover: I'm a TRUE believer in "pyramiding" my Position-sizing (I've discussed this many times in this thread) "Position-sizing Pyramiding" is handle by re-balancing my weekly position-sizes. How? - Position-sizing uses my trading Bank balance - the Bank feed is sent to a parameter setting within the strategy code. It's simply a way of putting every dollar to work.
A lot of interesting talk this week and a pretty disappointing/bad end result for the systems today
I know there is so much to fix that I feel pretty tempted to stop system 2 and flipper.
System1 lost a whooping $829 on a week which saw the asx surge
For the new followers: This portfolio is an educational portfolio
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?