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 now Quantplan

  • @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

Sentiment analysis

GenSim, Spacy and Vader for libraries that would help you determine topic + sentiment. Then you only need a data feed, like Twitter and/or NewsAPI. Both also have python client libraries.

python_quant.txt · Last modified: 2019/06/22 02:05 by root
RSS - 200 © CrosswireDigitialMedia Ltd