Table of Contents

1 Goals

1.1 Access of market data

1.2 Visualize market data

1.3 discover market data

1.4 market simulator

2 Week 1

2.1 Tutorials

  • QSTK Tutorial 1 Reading data and basic time series operations and plotting
  • QSTK Tutorial 2 Reading CSV data (not QSTK specific).
  • QSTK Tutorial 3 Tips for accessing historical data via DataAccess + a quick and dirty portfolio back test, only has initial portfolio weight, not rebalance.
  • QSTK Tutorial 4 Creating a an equity allocation DataFrame using random number, including cash.
  • QSTK Tutorial 5 Using qstksim to back test an allocation strategy, rebalance everyday.

2.2 access of historical equity data

  • using QSTK code for basic time series analysis of stock price data.
  1. Reading historical data
    import QSTK.qstkutil.qsdateutil as du
    import QSTK.qstkutil.tsutil as tsu
    import QSTK.qstkutil.DataAccess as da
    
    import datetime as dt
    import matplotlib.pyplot as plt
    import pandas as pd
    
  2. Normalized Data
    na_normalized_price = na_price / na_price[0, :]
    

2.3 first look at portfolio optimization

create and optimize a portfolio for the year 2011.

  1. Write python function that can simulate and assess the performance of a 4 stock portfolio
    • input:
      • start date.
      • end date.
      • symbols.
      • allocation weight.
    • return:
      • standard deviation of daily return of the total portfolio.
      • average daily return.
      • sharpe ratio.
      • cumulative return.

      !! daily return should use normalized data, or the daily weight will be rebalanced during the calculation.

    • optimization:

      Use gradient ascent, but the weight allocation is not linear.