Code Monkey home page Code Monkey logo

quantopian_momentum's Introduction

quantopian_momentum

Author: Ian Doherty

Date: April 13, 2017

This algorithm holds indicators for trading momentum, it does not contain a strategy!

RVI (Relative Vigor Index - Oscillator indicator)

INPUTS: OHLC prices
Numerator
a = close - open <br />
b = close - open // one bar prior to a
c = close - open // one bar prior to b
d = close - open // one bar prior to c
numerator = ( a + (2 * b) + (2 * c) + d ) / 6
Denominator
e = high - low // of bar a
f = high - low // of bar b
g = high - low // of bar c
h = high - low // of bar d
denominator = ( e + (2 * f) + (2 * g) + h) / 6
RVI given select period
Current period selected = 20

RVI = SMA of numerator for selected period /
        SMA of denominator for selected period
Signal Line
i = RVI // one bar prior
j = RVI // one bar prior to i
k = RVI // one bar prior to j
SIGNAL_LINE = (RVI + (2 * i) + (2 * j) + k) / 6

RSI (Relative Strength Index - Momentum indicator)

RSI = 100-100/(1+RS)
RS = Average gain of up periods w specifed period/
    Average loss of down periods during a specified period
The RSI in this algorithm is calculated using talib

Bollinger bands ( - Volatility indicator)

    1. Moving average
    2. Upper band at K times an N-period standard deviation
    3. Lower band at K times an N-period standard deviation
This Bollinger Bands in this algorithm is calculated with talib

CCI (Commodity channel index - Oscillator indicator)

CCI = Price - MA / 0.015 x D
The CCI in this algorithm is calculated with talib

quantopian_momentum's People

Contributors

idohertyr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.