[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Referencing Equity



PureBytes Links

Trading Reference Links


Hah, you were thinking along the same lines as I.  But I was hoping
there was an easier way.  I guess in real trading you wouldn't
necessarily need to have the exit points using the equity curve
contained within the systems code.  You can just edit the portfolios
equity's code to contain the designated signals, which will then show
up after the backtest is run.  But it would make backtesting a lot
simpler if you could reference global portfolio equity within your
systems code.  Thanks for the input.

David

--- In amibroker@xxxxxxxxxxxxxxx, "Herman van den Bergen"
<psytek@xxxx> wrote:
> I am afraid this may not work with the portfolio tester... however the
> portfolio tester creates a composite 'stock' named ~~~Equity, its
OHLC price
> arrays are used and can be retrieved as follows:
> 
> PortEquity=Foreign("~~~EQUITY", "C");
> cash = Foreign("~~~EQUITY", "L");
> LongEquity=Foreign("~~~EQUITY", "O");
> ShortEquity=Foreign("~~~EQUITY", "H")
> 
> You could first run your Portfolio tester and then subsequently run
another
> (a non-portfolio, else you would have to copy the ~~~Equity first
since it
> would overwrite it) system that accesses the ~~~Equity. Kind of
breaking up
> the process into two parts.
> good luck,
> 
> herman.
> 
> 
> 
>  -----Original Message-----
> From: David [mailto:junk@x...]
> Sent: Friday, April 08, 2005 7:32 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Referencing Equity
> 
> 
> 
> 
>   Thanks Herman.  You got me set in the right direction.  I previously
>   tried placing a new signal set after the intermediate equity, as you
>   term it.  But the results did not change.  I tried it again but only
>   backtesting on one security and this time it did actually exit at the
>   right price.  However, on a basket of securities the results weren't
>   correct.  I think I'm accessing inidividual equity curve with equity()
>   instead of the portfolio equity curve.  I looked in the help manual
>   but couldn't find the expression used to get portfolio equity?
> 
>   David
> 
>   --- In amibroker@xxxxxxxxxxxxxxx, "Herman van den Bergen"
>   <psytek@xxxx> wrote:
>   > You can define one set of signals that are used to calculate the
>   equity()
>   > and then define s second set of signals that may be partially based
>   on the
>   > equity derived from the first set of signals. You must be sure
that the
>   > equity is based on preceeding events, so that you don't look ahead.
>   >
>   > Signal set 1
>   > intermediate equity()
>   > signal set 2
>   > final equity
>   >
>   > best regards,
>   > herman
>   >   -----Original Message-----
>   >   From: David [mailto:junk@x...]
>   >   Sent: Friday, April 08, 2005 3:55 PM
>   >   To: amibroker@xxxxxxxxxxxxxxx
>   >   Subject: [amibroker] Referencing Equity
>   >
>   >
>   >
>   >   Okay, thought I would ask this a different way.  The equity()
function
>   >   is an array that stores the equity curve for your systems buy,
sell
>   >   signals, etc.  So equity() must be listed after the BUY and SELL
>   >   variables.  But how would you reference the equity() function to
>   >   influence the BUY and SELL signals if everything listed after the
>   >   equity() function call is ignored?  Such as a simple example like:
>   >
>   >   Buy = IIf(Month() == 1 AND DayOfWeek() == 1 AND Day() < 10 AND
Year()
>   >   == 1995,1,0);
>   >   Sell = E > 100000;
>   >   E = Equity(1);
>   >
>   >   This would just buy on the first week of the first month of
the year
>   >   1995.  But to sell when your equity balance reaches $100,000 would
>   >   reference the uninitialized E variable.
>   >
>   >   Sorry if this is a stupid question but I just bought Amibroker
and my
>   >   knowledge is still limited.  I would appreciate any help.
>   >
>   >   David
>   >
>   >
>   >
>   >
>   >
>   >   Please note that this group is for discussion between users only.
>   >
>   >   To get support from AmiBroker please send an e-mail directly to
>   >   SUPPORT {at} amibroker.com
>   >
>   >   For other support material please check also:
>   >   http://www.amibroker.com/support.html
>   >
>   >
>   >
>   >
>   >
>   >
>  
--------------------------------------------------------------------------
> --
>   > --
>   >   Yahoo! Groups Links
>   >
>   >     a.. To visit your group on the web, go to:
>   >     http://groups.yahoo.com/group/amibroker/
>   >
>   >     b.. To unsubscribe from this group, send an email to:
>   >     amibroker-unsubscribe@xxxxxxxxxxxxxxx
>   >
>   >     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>   Service.
> 
> 
> 
> 
> 
>   Please note that this group is for discussion between users only.
> 
>   To get support from AmiBroker please send an e-mail directly to
>   SUPPORT {at} amibroker.com
> 
>   For other support material please check also:
>   http://www.amibroker.com/support.html
> 
> 
> 
> 
> 
>
----------------------------------------------------------------------------
> --
>   Yahoo! Groups Links
> 
>     a.. To visit your group on the web, go to:
>     http://groups.yahoo.com/group/amibroker/
> 
>     b.. To unsubscribe from this group, send an email to:
>     amibroker-unsubscribe@xxxxxxxxxxxxxxx
> 
>     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/