Back to Home


A fundamental array and math library of python at

  • numpy Arrays

Getting our data into numpy as array

import numpy as np
my_list = [1,2,3]
x = np.array(my_list)

or matrix



From quantopia Zipline is a Pythonic algorithmic trading library. It is an event-driven system that supports both backtesting and live-trading.

 pip install zipline

Quantopia Functions

  • @batch_transform
  • history
  • Portfolio Allocation
# This is the standard Quantopian function that initializes your data and 
# variables. In it, we define how large of a 'bet' we're making (in dollars) and what 
# stock we're working with.
def initialize(context):
    # we will be trading in AMZN and WMT shares
    context.stocks = symbols('AMZN', 'WMT')
    context.bet_amount = 100000
    context.long = 0
python_quant.txt · Last modified: 2018/02/12 00:20 by root
RSS - 200 © CrosswireDigitialMedia Ltd