2012Fall7646 Homework 5

From Quantwiki
Jump to: navigation, search


Example technical indicator: Moving Average created using QSTK/Examples/Basic/movingavg-ex.py .
Example technical indicator: Bollinger Bands Feature .

This assignment is meant to :

  1. Get you on track for the event profiler.
  2. Get you started to create indicators (or features) using historical data.

Your task is to implement a technical indicator. Bollinger bands are one possibility, other indicators of interest, that you might consider for use in the next assignment include:

  • Current price relative to 52 week high/low
  • Current volatility relative to 52 week high/low volatility
  • Volume relative to 52 week high/low.

You might also look here for ideas:


To convert present value of Bollinger bands into -1 to 1:

boll_val = 2 * ((current_price - lower_band)/(upper_band - lower_band)) - 1

To Do

  • Implement an indicator in Python using Pandas:
    • Symbol: IBM
    • Startdate: 1 Jan 2009
    • Enddate: 1 Jan 2010
    • 20 period lookback
  • Plot
    • Plot 1: adjusted close and relevant plots for your indicator into file "plot1.pdf"
    • Plot 2: value of the indicator ranging from about -1 to +1 into file "plot2.pdf"


Submit 3 files (attachment) via t-square:

  • code.py
  • plot1.pdf
  • plot2.pdf

How to submit

Go to the t-square site for the class, then click on the "assignments" tab. Click on "add attachment" to add your files. Once you are sure you've added the files, click "submit."