Greetings, I've been working with blotter the past couple days, and one thing I've noticed is that if one calls updatePortf on a portfolio object, it fails: Error in get(Symbol, envir=as.environment(.GlobalEnv)) : Object 'SPY' not found. I load my daily data in a separate environment using getSymbols, and I'm wondering if there is anyway to get blotter to change which environment it looks for historical price data in. traceback() indicates the call to updatePortf uses the getPrice function in quantmod and passes the .GlobalEnv to it. I've tried adding the environment with the price data to the search path, however that did not work. Does anyone know a way around this issue? I'd rather not have to keep all necessary data in the global environment if possible. Thanks!
Blotter updatePortf function can't find historical data in non global environment
7 messages · Chuck, Brian G. Peterson, G See
passing env='whateverEnvIuse" or env=.wheteverenvIuse doesn't work? Please provide a reproducible example, per the posting guide. - Brian
On Mon, 2011-09-12 at 19:22 -0400, Charlie Friedemann wrote:
Greetings, I've been working with blotter the past couple days, and one thing I've noticed is that if one calls updatePortf on a portfolio object, it fails: Error in get(Symbol, envir=as.environment(.GlobalEnv)) : Object 'SPY' not found. I load my daily data in a separate environment using getSymbols, and I'm wondering if there is anyway to get blotter to change which environment it looks for historical price data in. traceback() indicates the call to updatePortf uses the getPrice function in quantmod and passes the .GlobalEnv to it. I've tried adding the environment with the price data to the search path, however that did not work. Does anyone know a way around this issue? I'd rather not have to keep all necessary data in the global environment if possible. Thanks!
_______________________________________________ R-SIG-Finance at r-project.org 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.
Brian G. Peterson http://braverock.com/brian/ Ph: 773-459-4973 IM: bgpbraverock
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20110912/f807960a/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20110913/762af3ef/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20110913/cebf5ffe/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20110913/7f503f91/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20110913/77cc708a/attachment.pl>