[R-SIG-Finance] Simple portfolio management - anything in R?

Peter Carl peter at braverock.com
Fri Oct 25 19:21:56 CEST 2013


> 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

> On Fri, Oct 25, 2013 at 8:48 AM, Peter Carl <peter at braverock.com> wrote:
>> Consider blotter, which is specifically for calculating P&L from trades
>> and prices (for generating returns for analysis in
>> PerformanceAnalytics).
>>
>> install.packages("blotter", repos="http://R-Forge.R-project.org")
>>
>> pcc
>> --
>> Peter Carl
>> http://www.braverock.com/peter
>>
>
> Hi Peter,
>    Yes, I think the solution, if it exists or needs to be written,
> probably revolves around blotter and PerformanceAnalytics. However
> every time I start looking at those things I glaze over for lack of
> documentation. Nothing in there seems oriented toward teaching how to
> use the packages so I was hoping maybe someone has already written
> some example code of something like this:
>
> 1) Have a list of stocks & download EOD data from Yahoo for that list
> (Easy)
> 3) Read a list of transactions in any human writable format. I.e. -
> I'll get the trades from my broker and enter them in some reasonable
> file format.
> 4) Generate some simple data from those transactions: equity curve for
> each stock, for the portfolio
>
>    I suspect that if this much existed that a programmer with my
> meager skills might be able to go forward. However I can't find the
> starting point in the blotter or PerformanceAnalytics help pages.
> Maybe I just haven't found the right page yet though.
>
> Cheers,
> Mark
>



More information about the R-SIG-Finance mailing list