[R-SIG-Finance] Simple portfolio management - anything in R?
Mark Knecht
markknecht at gmail.com
Fri Oct 25 23:25:20 CEST 2013
On Fri, Oct 25, 2013 at 10:21 AM, Peter Carl <peter at braverock.com> wrote:
>> every time I start looking at those things I glaze over...
> I recommend a double espresso. Then:
>
> library(blotter)
> ?blotter
>
> In the example provided, you can see your starting point:
> ?getSymbols
> ?initPortf
> ?addTxns
> ?updatePortf
> ?initAcct
> ?updateAcct
> ?updateEndEq
>
> pcc
> --
> Peter Carl
> http://www.braverock.com/peter
Peter,
Thanks for the pointers. I've made a little bit of headway this
Friday afternoon and likely can make more progress over the weekend.
One quick question, mostly out of curiosity. How/where are blotter
portfolios stored? The initPortf function seems to create something
lasts beyond my current run of R. If I exit R-Studio, reenter and
rerun my code that created the portfolio in the first place it tells
me:
> initPortf(name="Mark1",symbols="StockList")
Error in initPortf(name = "Mark1", symbols = "StockList") :
Portfolio Mark1 already exists, use updatePortf() or addPortfInstr()
to update it.
I do see it's in the blotter environment:
> ls(envir=.blotter)
[1] "portfolio.Mark1"
I'm on Linux, ran updatedb and attempted to locate both portfolio
and Mark1 but didn't find anything meaningful.
Thanks,
Mark
More information about the R-SIG-Finance
mailing list