Book for Magic Formula

I want to create a book for my version of Greenblatt’s Magic Formula. It will be composed of 4 simulated Ports., all of which are identical except for origination date. For example 01/01/2013, 03/01/2013, 05/01/2013, 07/01/2013. I have been unable to do this, because the origination date of the book defaults to the origination date of the most recent Port. I assume, this is because that is the earliest date that the book is complete, with all 4 Ports. So that nullifies one of the important features of the MF, which is to purchase equal amounts of stock at different times in the first year and that obviously carries over to subsequent years. I would appreciate any help I can get. Thanks in advance.

I haven’t checked this, but a thought to try:

  • is there a way in the 2nd, 3rd and 4th portfolios to put an AND buy condition for date? Such as date > 3/01/2013. I don’t know if there’s a way to do that, but it would prevent any buys prior to that date. DaysDiff() or DaysSince() might be ways to approach that.
  • there’s a command to require a minimum # of bars hold “NoBars” if that is the intention to hold a specific minimum # of days for each buy.

Not sure if this helps, but might give a way to approach.

It turned out t be quite simple:PortBars>X-The book seems to be functioning properly, and I assume that after PortBars are over 40, the next Port will kick in. Thanks

AsOfDate should work, too.

How often are your models reconstituting? Is it annually, quarterly, weekly? That can be a bit tricker.

Walter