• Become a Quant
    • Get Started
    • Download Toolkit
      • Install
    • Toolkit Documentation
      • Matlab
      • Python
    • Trading System 101
      • Sample System
    • Markets
    • Macro Economic Indicators
    • Quant Tutorials
      • Videos
      • Presentations
    • EPAT
    • FAQs
    • Tell a friend
  • Competitions
    • Evaluating: Q12 Competition
    • Closed: Q11 Competition
    • Closed: Q10 Competition
    • Closed: Q9 Competition
    • Closed: Q8 Competition
    • Closed: Q7 Competition
    • Closed: Q6 Competition
    • Closed: Q5 Competition
    • Closed: Q4 Competition
    • Closed: Q3 Competition
    • Closed: Q2 Competition
    • Closed: Futures Competition
    • Closed: Kickoff Competition
  • About
  • Systems
  • Blog
  • Forums
  • Get Started
  • Download Toolkit
    • Install
  • Toolkit Documentation
    • Matlab
    • Python
  • Trading System 101
    • Sample System
  • Markets
  • Macro Economic Indicators
  • Quant Tutorials
    • Videos
    • Presentations
  • EPAT
  • FAQs
  • Tell a friend
PythonMatlab
  

Get Started With Quantiacs

Python

The Quantiacs Toolbox helps you with the development and the backtesting of your trading algorithms. The following 4 steps will get you started with the Quantiacs Toolbox: 

  1. Install Python
  2. Install the Quantiacs Toolbox
  3. Run a sample trading algorithm
  4. Making your first changes
A detailed documentation is available here, where you can find many useful information about the toolbox.
 
You need to be logged-in to download the toolbox and submit a system.
Sign Up Now


 
 
1.    Install Python 2.7

Download and install Python 2.7. There are several distributions of Python 2.7 that can be used. For an easy installation process, we recommend Anaconda since it will reliably install all the necessary dependencies.

Installing Python with Anaconda
Download Anaconda and follow the instructions on the installation page. You might have another Python version pre-installed on your computer. When installing the Anaconda distribution, it is important that you know how to access it from the command line. This is different for each operating system:

  • Windows: When installing Anaconda be sure to leave the ‘Add Anaconda to my PATH environment variable’ box checked. This makes the Anaconda distribution available from the command line. Additionally, after installation Anaconda supplies a command prompt that is pointed to the Anaconda distribution.
  • Linux/OSX: Following the instruction on the Anaconda installation page, be sure to select yes when prompted to add the Anaconda install location to your PATH. This will make the Anaconda distribution available from your command line.

Installing the necessary packages manually
If you are experienced with Python, you can install the necessary dependencies manually. We recommend to set up a virtual environment and `pip install` the following packages:

  • Numpy
  • Pandas
  • Matplotlib


2.    Install the Quantiacs Toolbox

The easiest way to install the toolbox is to use the pip installer in Python. The pip installer is already installed if you are using Python 2.7.10 or greater. Having the latest version of pip is also recommended. To upgrade pip, type the following in the command line:

	pip install -U pip
Now you are ready to install the Quantiacs Toolbox via pip. It is highly recommended that you use the latest version of the toolbox (2.2.5). You can install or upgrade to this version by running the following at the command line:

	pip install -U quantiacsToolbox
If you don’t want to install the toolbox through pip, download the toolbox from my area on the Quantiacs site. Make sure that you have the necessary dependencies installed (numpy, pandas, and matplotlib) and that they are up to date. Extract the contents of the toolbox download, open a command prompt within the folder and type:

	python setup.py install
If you have any issues post a question in the forum and we’ll respond ASAP.


3.    Run a sample trading algorithm

With the toolbox installed, you can now backtest your trading algorithms. We put a simple sample algorithm example on github as a starting point.  To evaluate this sample algorithm type in the command line:

	python path/to/trading_system.py
This runs the evaluation of the sample system on the defined data set. Once the system is evaluated it opens a GUI with important performance indicators like the equity curve, the long vs short exposure, marketwise performance, and the Sharpe Ratio.

The Sharpe Ratio is one of several important performance numbers. It compares the realized performance against the risk (or volatility) taken to achieve that performance. Investors usually prefer systems with high performance and low risk. Here you can find more about important aspects of a trading algorithm and its performance.


4.    Make your first changes

Finally, we change the sample system, rerun it and submit a test to the Quantiacs marketplace. Open the downloaded sample strategy with your preferred editor (IDLE, atom, sublime, etc.). The sample trading system uses a Simple Moving Average (SMA) as an indicator to predict trends. The basic idea of an SMA is to smooth out fluctuating data points to lower the noise and detect signals. Here is an illustration of what these SMAs might look like.


Within, 'myTradingSystem', the algorithm evaluates two SMAs over two different time periods: longerPeriod = 200 days, shorterPeriod = 40 days. You can define how much the data is smoothened by setting the number of days over which we average the data. The higher the number, the more days you average, the smoother the SMA.

	longerPeriod=200
	shorterPeriod=40
Change the numbers of longerPeriod and/or shorterPeriod, save the changes and rerun the strategy. You will see how this changes the equity curve and the Sharpe Ratio.

To submit your tweaked strategy to the Quantiacs marketplace simply click the button ‘Submit Trading System’ at the bottom of the GUI. This redirects you to the website where you can set the name for your system and hit the submit button.
 
You can also submit your system via the command line. Start Python by typing:

	python
Within the python interpreter import the Quantiacs Toolbox and submit your strategy. ‘mySystemName’ is the name you’d like to give the system on the marketplace:

	import quantiacsToolbox

	quantiacsToolbox.submit(‘/Path/to/your/TradingSystem.py’,’mySystemName’)
Congratulations! You just successfully submitted your first trading algorithm to Quantiacs.

  

Get Started With Quantiacs

Matlab

The Quantiacs Toolbox helps you with the development and the backtesting of your trading algorithms. The following 3 steps will get you started with the Quantiacs Toolbox: 

  • Install the Quantiacs Toolbox
  • Run a sample trading algorithm
  • Making your first changes

A detailed documentation is available here, where you can find many useful information about the toolbox.
 

You need to be logged-in to download the toolbox and submit a system.
Sign Up Now


1.    Install the Quantiacs Toolbox

To get the Matlab Toolbox, download it from my area. Add the opened zip-file to your Matlab search path (Environment -> Set Path -> Add with Subfolders…). This will make the toolbox functions available from the command window.

2.    Run a sample trading algorithm

With the toolbox in your matlab search path, you can now backtest your trading algorithms. We put a simple sample algorithm example on github as a starting point. To evaluate this sample algorithm place the file in your Matlab search path (the current folder is recommended). Then type in the command line:

	runts(‘trading_system_name’)
This runs the evaluation of the sample system on the defined market list. Once the system is evaluated it opens a GUI with important performance indicators like the equity curve, the long vs short exposure, marketwise performance, and Sharpe Ratio.

The Sharpe Ratio is one of several important performance numbers. It compares the realized performance against the risk (or volatility) taken to achieve that performance. Investors usually prefer systems with high performance and low risk. Here you can find more about important aspects of a trading algorithm and its performance.

3.    Make your first changes

Finally, we change the sample system, rerun it and submit it to Quantiacs. The sample trading system uses a Simple Moving Average (SMA) as an indicator to predict trends. The basic idea of an SMA is to smooth out fluctuating data points to lower the noise and detect signals. Here is an illustration of what these SMAs might look like.


Within, 'myTradingSystem', the algorithm evaluates two SMAs over two different time periods: longerPeriod = 200 days, shorterPeriod = 40 days. You can define how much the data is smoothened by setting the number of days over which we average the data. The higher the number, the more days you average, the smoother the SMA.

	longerPeriod=200
	shorterPeriod=40
Change the numbers of longerPeriod and/or shorterPeriod, save the changes and rerun the strategy. You will see how this changes the Sharpe Ratio.

To submit your tweaked strategy to the Quantiacs marketplace simply click the button ‘Submit Trading System’ in the upper right of the GUI. This redirects you to the website where you can set the name for your system and hit the submit button. 

You can also submit your system via the command window. Simply type:
 
	submit(‘Trading_System_file’, ‘system_name’)
Here, ‘Trading_System_file’ is the name of the .m file in the Current Folder. ‘system_name’ is the name you’d like to give the system on the marketplace.

Congratulations! You just successfully submitted your first trading algorithm to Quantiacs.

Connect with us
  • Contact
  • Jobs
  • User agreement
  • Legal Notice

Copyrights @ 2018 Quantiacs LLC