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

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.

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

Quantopian Algorithm & Research Idea Library

Found a forum post on Quantopian with an aggregate of recent strategies which I found interesting; specifically, the strategies (PEAD) focusing on time periods around earnings news since it is now earnings season.

Many of the strategies are based on academic papers, which are also worth a read for additional background on the topic. Again, kudos to Quantopian and all the great work they are doing to promote algorithmic trading!

Algorithmic Trading with Quantopian

I recently started researching algorithmic trading and got interested in the Quantopian platform, which includes a full development research, learning and development environment.

I have been using the platform for market research with the following tools:

1. Lectures & Tutorials – Lessons are presented with iPython notebooks

2. Extensive Data API’s – Utilized for backtesting

3. Development Environment – Develop and test algorithms

It is an impressive platform, and one that I highly recommend!

Please check back for more updates as I post more news on my progress.

Node.js on Heroku: Tutorial & Template

For anyone looking to get up and running on Node.js, I recommend the Heroku tutorial which provides a quick guide on deployment and a good template for future use.

Granted, it does take some basic programming knowledge to get all the steps but otherwise, the tutorial is easy to complete. I especially enjoy the minimalist template with intuitive defaults and great styling out of the box.

Great job, Heroku and please keep up the good work!