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

Re: [amibroker] Re: Variable position sizeing?



PureBytes Links

Trading Reference Links

 //PSO: Fitness: CAR
 //PSO: SaveCancelled: Y

// Funds

 fund1   = "";     
 fund2   = "";
 fund3   = "";
 fund4   = "";
 fund5   = "";

 SetTradeDelays( 1, 1, 1, 1 );
 SetFormulaName("Asset Allocation Mix 1.3");

 SetOption(  "InitialEquity",      100000 );
 SetOption(  "AllowSameBarExit",     True );
 SetOption(  "ActivateStopsImmediately",   False );
 SetOption(  "AllowPositionShrinking",    True );
 SetOption(  "FuturesMode",       False );
 SetOption(  "InterestRate",       0  );
 SetOption(  "MaxOpenPositions",      6  );
 SetOption(  "WorstRankHeld",       6  );
 SetOption(  "MinShares",        .0001 );
 SetOption(  "PriceBoundChecking",    True );
 SetOption(  "MarginRequirement",     100  );
 SetOption(  "ReverseSignalForcesExit",    True );
 SetOption(  "UsePrevBarEquityForPosSizing", False );
 
 fund1wt    = Optimize("fund1wt",        55,    10,   100,     1);
 fund2wt    = Optimize("fund2wt",        55,    10,   100,     1);
 fund3wt    = Optimize("fund3wt",        55,    10,   100,     1);
 fund4wt    = Optimize("fund4wt",        55,    10,   100,     1);
 fund5wt    = Optimize("fund5wt",        55,    10,   100,     1);
 
 PositionSize = (Name()=="")*-fund1wt + (Name()=="")*-fund2wt +
 (Name()=="")*-fund3wt + (Name()=="")*-fund4wt + (Name()=="")*-fund5wt;

 
----- Original Message ----- 
From: "Fred" <ftonetti@xxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, October 16, 2005 8:58 PM
Subject: [amibroker] Re: Variable position sizeing?


> You can't do any flavor of optimization w/o optimization statements.
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Erik Skyba" <eskyba@xxxx> wrote:
> >
> >     If I have 3 funds reprehensive of different asset classes. How 
> do I run a PSO optimization finding the best percentage allocation 
> for each fund. There is no buy or sell action. I need a minimum 
> allocation of 10% in each asset class. I want to create the best 
> allocation mix with the PSO optimization finding the best allocation. 
> How do I get the position sizing to change as the optimization runs? 
> > 
> > I was working with this piece of code: 
> > 
> > PositionSize= (Name()=="fund1")*-optiA + (Name()=="fund2")
> > *-optiB + (Name()=="fund3")*-optiC;
> > 
> > 
> > Thanks,
> > 
> > Erik SKyba
> >
> 
> 
> 
> 
> 
> 
> 
> 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
> 
> 
> 
>  
> 
> 
> 
> 
> 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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/