allocation strategy

's Avatar

fcarmagnac

18 Jun, 2010 01:53 PM via web

Hi,

i would like to implement a daily allocation strategy, ie : given N assets, the portfolio starts with a vector of weigths with 1/N for each asset. Then, at end of day the weights are recomputed. At the open of the next day, each asset position is readjusted buying/selling a few contracts to fit the new weight vector. (an error is assumed because the position is not continuous)

Is there an ad hoc strategy class designed for this ?

If not, is there another way than counting the N expected "onClose" class before recomputing the weigths ?

Thanks for your help.

  1. Support Staff 2 Posted by Guillaume on 18 Jun, 2010 02:20 PM

    Guillaume's Avatar

    Hi,

    Currently we don't have any specific feature in our framework to deal with this, so you have to count the number of onClose() invocation until you reach your number of instruments.
    When doing this, beware that your count variable must be static since the backtest runner creates one instance of your strategy per instrument.

    Later on, we might add new events like market open/close events that might simplify this kind of things.

    Regards
    Guillaume

  2. Guillaume closed this discussion on 18 Jun, 2010 02:20 PM.

Comments are currently closed for this discussion. You can start a new one.