I have uploaded part_2 and _2b to the same folder (draft versions).

Part3 might follow in which I will try to connect the dots using 
Tomasz's suggestion from the Knowledge base (should be the most 
interesting part).

Later a combined PDF with bookmarks, and maybe some pretty textboxes, 
will go up on the 3rd pary site for at least a couple of weeks.

AmiBroker website>knowledgebase

March 11, 2006
How to create copy of portfolio equity?
As you know Portfolio backtester creates special ticker "~~~EQUITY" 
which holds portfolio-level equity of the system under test. Some may 
find it useful to save this equity into another symbol after backtest 
for future analysis and/or comparison. Good news is that it is 
possible to do that automatically using custom backtester procedure 
and AddToComposite function. The formula below shows how.

// YOUR TRADING SYSTEM HERE
SetCustomBacktestProc("");
if( Status("action") == actionPortfolio )
{
 bo = GetBacktesterObject();
 bo.Backtest();
 AddToComposite( Foreign("~~~EQUITY","C"), 
                 "~~~MY_EQUITY_COPY", "X", 
                 atcFlagDeleteValues | atcFlagEnableInPortfolio );
}

BrianB2

Hope you all had a better day today than yesterday.
Unless of course you are a dancing bear.

--- In [email protected], "brian.z123" <[EMAIL PROTECTED]> wrote:
>
> Example files in the group files section based on Dingos example.
> 
> CompareIndexToPortfolio Folder.
> 
> I had to break the PDF to upload it.
> It is in draft form.
> It won't be up there for long.
> 
> Part2 will come out later - it goes into some variations and 
examples 
> of plotting the equity curve as an overlay on indexes.
> 
> Thanks to Dingo for the collaborative effort.
> 
> BrianB2.
> 
> 
> --- In [email protected], "dmcleod1981" <dmcleod1981@> 
wrote:
> >
> > I may be using the wrong key words when I am searching but I 
can't 
> find 
> > any previous samples that show how to add the buy and hold return 
> > during the back test period. If someone has any snippets or can 
> > reference a post number I would be greatful. 
> > 
> > Thanks
> > DM
> >
>


Reply via email to