Trading with Quantopian: Portfolio Rebalancing Strategy & Algorithm Example

Having spent some time with algorithmic trading platforms, I find Quantopian to be one of the most powerful and flexible in its offerings as follows:

1.  Free to sign up, backtest strategies and compete in their trading contest

2. Free plan offers many powerful data feed which are other subscription only

3. Platform is built around a large and growing community of active users

4. Some tools are open-source, and public algorithms can be cloned for use

That said, one of the simpler strategies is a portfolio rebalance across various asset classes. Turns out it is also conservative as well and intended for retirement accounts.

The strategy and algorithm are outlined in this community discussion post; the algorithm can be cloned as follows:

1. Sign up for a free account

2. Clone algorithm and run a backtest over a given time period

3. Once algorithm runs a backtest without errors, then deploy it live

Moving forward, feel free to modify the algorithm, which will then be under the code section of the account.

Python for Finance: Covered Call Options & Simulated Stock Returns

Running financial models with code is relatively easy provided that one has some previous programming and math/statistics experience.

That said, I have been working through the examples in the Python for Finance book by Packt Publishing and am sharing examples for pricing covered calls and simulating stock returns as listed below.

Source code of my updated examples are available on my Github repo.

Chapter 9, Example 15: Covered Stock Option Call

Chapter 11, Example 12: Simulating Stock Returns with Lognormal Distribution

OpenIntro Statistics: Summer Study for HES, Statistics E-100

I used part my summer to study up for my current course (statistical methods) at HES so am working thru the class textbook, OpenIntro Statistics.

The textbook is open-source, which means lots of useful updates/contributions and material is readily available for free. It was designed as a template for instructors to use for teaching their own courses.

That said, the topics has come in handy not only for class but in my study of algorithmic trading and financial markets.

Chat with Traders #69: John Carter (Options Trading)

I enjoyed listening to Episode #69 with John Carter, who is an options/futures trader and founder of Simpler Trading.

John discusses his trading style using options with focus on concentrated positions while managing risk. In particular, I found his tip on how to covered calls out of the money since they normally expire worthless.

Kudos to Aaron for this interview and Chat with Traders, please keep up the great work!

Python for Finance by Packt Publishing

I am spending the summer off between work and school semesters to learn more about algorithmic trading so started working through examples in  Python for Finance by Packt Publishing.

The book focuses on financial models and examples are algorithms implementing those models. There are easy instructions for installing Python and the examples run as scripts.

Having programming experience and some knowledge of financial markets, I was able to get up and running so would recommend the book for anyone interested in learning more about this topic.

Brief Introduction to Algorithmic Trading

For anyone without programming experience but interested in learning about algorithmic trading, I would recommend the steps listed below to get off the ground running without getting side-tracked:

Learn Python to Hard Way – A good primer to get going quickly

Install Python with Anacaonda – Easy installation and comes with other useful tools such as iPython notebooks

Quantopian Lectures – Covers theory and implementation in Python; example algorithms can be easily clone and hosted on their platform

Additional Learning – Next steps would be continuing to study programming with books from O’Reilly and Packt which have publications on this topic and consider other languages for implementation

I recommend Python since it is easy to learn, and one can learn other languages once learning the first proficiently. Quantopian is the next choice since they provide valuable data sets for free on their platform and provide hosting, both of which would be side projects to implement by themselves.

This is not a comprehensive list but intended to a brief guide to get up and running in order to explore the topic.

Trading Indicators: Volume/Price, VWAP & MACD

I found lots of useful advice in CWT podcast #56 with Matt Zimberg (Optimus Futures); specifically, focusing on a select number of indicators for making trading decisions.

Kudos to Aaron for this interview and Chat with Traders, please keep up the great work!

As a result, listed below are ones which I have been successfully using over the past several months:

Volume/Price: Candlestick plot on 60-min and 1-day intervals using the Street Smart charting tool

VWAP: Chart in its own plot within Street Smart, which displays well with the 60-min interval

MACD: Refraining from oscillators to keep things simple, I use just one (MACD) to monitor momentum

Python for Finance by Yves Hilpisch

Just wanted to check in with a book recommendation – Python for Finance by Yves Hilpisch, which covers programming for basic financial modeling and algorithmic trading.

Resources are listed below and kudos to O’Reilly and The Python Quants group (founded by Yves Hilpisch) for providing these great resources for those of us researching this topic!

Python for Finance by Yves Hilpisch – O’Reilly

Book Code Examples – Github

The Python Quants Group