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

[amibroker] Re: Hedge Bet Control



PureBytes Links

Trading Reference Links

ozzyapeman,

> It was easy.

As Mike says, there might be some alligators in that swamp and it might 
not turn out to be so easy or straightforward afterall.

There is another possibility that I have discussed before but I only 
have it at the theoretical stage.

In the topic "Inline Backtester" I posted some code that plots the 
trade series (as GrowthFactor) and the equity curve for a single stock.

Note - it only allows one trade to be entered at a time and it is 
independent of Money Management (it compounds equity starting with the 
intial equity). IMO this is the preferable 'settings' for what you want 
to do but that comes down to individual choice.

It is also independent from the equity() function so it isn't necessary 
to stick to the backtester reserved variables e.g. you could test more 
than one system at a time using several buy/sell rules.

I am not certain about it but I think you could:

step1 - use buy1, sell 1 and produce the long trade series/equity curve 
for symbol "A'
step 2 - use Foreign with sell2,buy2 and produce the short trade 
series/equity curve for symbol 'B'
step 3 - multiply arrayA trade series * arrayB trade series to get the 
combined (portfolio) trade series/equity curve

Then you could plot the three curves as an indicator.

(symbol A and symbol B could be a non-correlated pair).

You could also calculate other metrics (equity curve or others) from 
those arrays.

brian_z



--- In amibroker@xxxxxxxxxxxxxxx, "ozzyapeman" <zoopfree@xxx> wrote:
>
> Hey Mike, thanks again. Your link pointed me to the right direction.
> It was easy. If anyone is as crazy as me to bother with hedges, just
> use this:
> 
> // signal-based backtest, redundant (raw) signals are NOT removed,
> // MULTIPLE positions per symbol will be open if BUY/SHORT signal is
> //"true" for more than one bar and there are free funds
> // Sell/Cover exit all open positions on given symbol, Scale-In/Out
> work on all open positions of given symbol at once.
> 
> SetBacktestMode( backtestRegularRawMulti );
>



------------------------------------

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/