Skip to content

Blotter updatePortf function can't find historical data in non global environment

7 messages · Chuck, Brian G. Peterson, G See

#
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!
#
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: