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

Re: [amibroker] Re: Hedge strategy



PureBytes Links

Trading Reference Links



Thanks Mike,
 
I'll check it out.

On Sun, Feb 14, 2010 at 8:35 AM, Mike <sfclimbers@xxxxxxxxx> wrote:
 

http://finance.groups.yahoo.com/group/amibroker/message/136986

Mike



--- In amibroker@xxxxxxxxxxxxxxx, "Adrian" <adrian.mollenhorst@xxx> wrote:
>
> I see in here alot of examples of pair trades, based on a watchlist of pairs, however I want to hedge all my trades against a single symbol - the SPY.
>
> I have my watchlist of SP500 symbols, and I want to be able to backtest Excess returns. So for every Long, I want to be short SPY and every short, I want to be long SPY.
>
> I have tried 'SetForeign' with the following, but it never issues a SPY short:
>
>
> Buy = c==hhv(c,300);
> BuyPrice = C;
> Sell = BarsSince(Buy) ==6;
> SellPrice = C;
> PositionSize = -10;
>
> SetForeign("spy",True,True);
> Short = Buy;
> ShortPrice = C;
> Cover = Sell;
> CoverPrice = C;
> RestorePriceArrays(True);
>
> Any thoughts on how to take an opposite position on SPY to the long trade?
>
> Adrian
>




__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___