On Tue, 2012-05-15 at 12:43 -0700, algotr8der wrote: > I don't think its desirable to cut the testing period to the shortest > date range because some of the stocks listed at a future date. I'm > afraid I don't quite understand the logic behind why updatePortf > *needs* to get a price for a stock that has no Txns. It makes sense to > me if there was a valid Txn then updatePortf needs a price to perform > a daily mark but in this case trading can't begin on the stock in > question until at least the date with the first price.
The startDate on your *portfolio* and *account* need to be before the first trade in any instrument. You need to have market data for *at least one observation* before the first trade in that instrument, so that we have something to mark against. I'm not aware of any restriction that you need data for all the same dates/times, in fact, it was designed to not need this. We pretty routinely include contracts that expire in a larger portfolio, for example. This error: no Prices available for AKAM in 1999-05-12 23:59:59::1999-05-13 23:59:59 : using last available price and marking to 1999-05-13 23:59:59 suggests that you have a position for AKAM. There is one simplification in the code that I am aware of that might cause something similar. You could make it go away by putting the symbol that has the longest time series *first* in your portfolio. If that doesn't work, I can work with you off-list to try to find and fix the problem. Regards, - Brian -- Brian G. Peterson http://braverock.com/brian/ Ph: 773-459-4973 IM: bgpbraverock _______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.
