13.08.2022 Views

advanced-algorithmic-trading

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

357

Ticker Name Period Link

SPY SPDR S&P 500 ETF 29th September 2003

- 12th October 2016

Yahoo Finance

IJS

iShares S&P Small-

4th December 2007 -

Yahoo Finance

Cap 600 Value ETF

12th October 2016

EFA

iShares MSCI EAFE

4th December 2007 -

Yahoo Finance

ETF

12th October 2016

EEM iShares MSCI

Emerging Markets

ETF

4th December 2007 -

12th October 2016

Yahoo Finance

AGG

iShares Core US Ag-

29th September 2003

Yahoo Finance

gregate Bond ETF

- 12th October 2016

JNK

SPDR Barclays Cap-

4th December 2007 -

Yahoo Finance

ital High Yield Bond

12th October 2016

ETF

DJP iPath Bloomberg

Commodity Index

Total Return ETN

4th December 2007 -

12th October 2016

Yahoo Finance

RWR SPDR Dow Jones

REIT ETF

4th December 2007 -

12th October 2016

Yahoo Finance

This data will need to placed in the directory specified by the QSTrader settings file if you

wish to replicate the results.

25.4 Python QSTrader Implementation

In this section the required components within the QSTrader codebase will be explained in order

to allow further exploration and/or development of your own rebalancing logic. Secondly, the

"client" code will be outlined in order to demonstrate how to quickly setup a backtest using the

built-in monthly rebalance logic.

There are two components within the QSTrader codebase required to make this monthly rebalance

logic work. The first is a subclass of the Strategy base class, namely MonthlyLiquidateRebalanceStrategy.

The second is a subclass of the PositionSizer base class, namely LiquidateRebalancePositionSizer.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!