Portfolio Simulations

Casimir Saternos
05/11/2015

Access Equity Data

library(quantmod)
getSymbols(c('QQQ'))
[1] "QQQ"
head(QQQ)
           QQQ.Open QQQ.High QQQ.Low QQQ.Close QQQ.Volume QQQ.Adjusted
2007-01-03    43.46    44.06   42.52     43.24  167689500        40.32
2007-01-04    43.30    44.21   43.15     44.06  136853500        41.09
2007-01-05    43.95    43.95   43.48     43.85  138958800        40.89
2007-01-08    43.89    44.12   43.64     43.88  106401600        40.92
2007-01-09    44.01    44.29   43.63     44.10  121577500        41.12
2007-01-10    43.96    44.66   43.82     44.62  121070100        41.61

Visualize Using Charts

candleChart(QQQ, theme="white")

plot of chunk unnamed-chunk-2

Delivered via Web Application

  • Web Accessible Interface
  • Portfolio consisting of EFT shares of
    • SPY: SPDR S&P 500
    • QQQ: PowerShares QQQ Trust, Ser 1 (Nasdaq)
    • BND: Vanguard Total Bond Market
    • GLD: SPDR Gold Shares
  • Ability to superimpose technical indicators (Bollinger Bands)

Benefits

  • Illustrates benefits of
    • Long term investing
    • Asset allocation
  • Small code-base (< 100 lines) can be easily customized
    • Other equities
    • Additional web page controls
  • Application presents value of portfolio in total based on price-per share and the number of shares owned.
  • See the demo online at shinyapps.io.