Message-ID: <5436FB2C.2090309@braverock.com>
Date: 2014-10-09T21:16:28Z
From: Brian G. Peterson
Subject: quantstrat - model transactions on specific dates
In-Reply-To: <CAK2H+efw2PrRYVv8xt9y0Y7guouwVZum9PJ_wgQ0B3moGErPdw@mail.gmail.com>
On 10/09/2014 04:00 PM, Mark Knecht wrote:
> Best I can
> tell the applyStrategy.rebalance function rebalances individual stocks
> based on the last entry date of that stock but not, for instance, on a
> specific date like the a calendar quarter. (I wasn't going to post
> this all right now until I was really sure so don't take this too
> seriously.) Anyway I want to write something like what Faber &
> Richardson wrote about in 'The Ivy Portfolio' where the whole
> portfolio is rebalanced on a given date, like end-of-month,
> independent of whether I'm using the 10 month SMA or not. For that
> reason I figured I might need a way to match indexes to dates going
> though time.
see the faber_rebal demo.
The rebalance_on argument will call the rebalancing rule(s) on whatever
periodicity you tell it to, you'll have to have something for them to do.
In the demo, I just changed max order size, but there's no reason you
couldn't write a (strategy specific) rebalancing rule that wouldn't read
all the positions, and do transactions on the rebalance date.
Regards,
Brian
--
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock