Coder Social home page Coder Social logo

twp's Introduction

Trading With Python course

Now open source!

The course material consists of 'notebooks' that contain text together with interactive code like this one. You will be able to learn by interacting with the code and modifying it to your own liking. It will be a great starting point for writing your own strategies

While some topics are explained in great detail to help you understand the underlying concepts, in most cases you won't even need to write your own low-level code, because of support by existing open-source libraries : TradingWithPython library combines much of the functionality discussed in this course as a ready-to-use functions and will be used throughout the course. Pandas will provide you with all of the heavy-lifting power needed in data crunching.

The course focuses as much as possible on hands-on examples of real problems involved in quantitative trading. We will start with setting up developing environment and getting historic price data. After that we will backtest a couple of typical trading strategies. Theoretical part (math & computer science) will be kept to a minimum and only treated where needed.

We will start by setting up a Python environment and get a basic feel of the language. Then we will jump right in and use case studies to get accustomed to working with data aalysis and strategy development.

Course contents

Introduction
    Preface
    Installation
Development tools
    IPython
    Source code editors
    Jupyter notebook
Overview of python basics
    Working with modules
Visualizing data
    Visualization with matplotlib
    Plotting with Pandas
    Bokeh plots
    TWP plotting class
Simulating leveraged etfs
    How about 3x leverage?
Day of week seasonality of SPY
    Get the data
    Working with dates and times
    Analyse weekday seasonality
Working with csv files
    Reading csv
    Writing csv files
Building a stock price database
    Download historic data
    Multi-index
    Save data to file
    Load data from file
Performance metrics
    Sharpe ratio
    Drawdown
    Profit ratio
Backtesting with TWP backtesting module
    Test on real price data
    Walk-forward moving averages strategy
Moving averages crossover strategy
    Divide dataset
    Develop strategy
    Make a parameter scan
    Conclusion
Permanent portfolio
    Get price data
    Simulate portfolio
    Conclusion
XLP strategy
    Rewrite strategy to a single function
    Make a scan of ALL parameters
    Conclusion
    Improvements
Pairs trading examples
    Get list of XLE components
    Get the price data
    Visualise dataset
    Build spread and visualise data
    Create a trading strategy
    Conclusion
VXX strategy
    Strategy thesis
    Get the data
    Get data from CBOE
    Research relationship VIX-VIX3M
    More precise simulation
Leveraged ETF backtest YTD
    Create pairs
Nearest neighbors strategy
    Strategy thesis
    Prepare data
    Create trader class
    Conclusion
External references

twp's People

Contributors

sjev avatar

Watchers

James Cloos 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.