From 3a0bb67f1626061435f8dd1415da8f7e794b7805 Mon Sep 17 00:00:00 2001
From: Victor Grau Serrat pip Installpip Install
%load_ext catalyst
-%pylab inline
figsize(12, 12)
import matplotlib.pyplot as plt
@@ -575,8 +574,7 @@ data for you. The first argument is the number of bars you want to
collect, the second argument is the unit (either '1d' for '1m'
but note that you need to have minute-level data for using 1m). This is
a function we use in the handle_data() section:
-%%catalyst --start 2016-4-1 --end 2017-9-30 -x bitfinex
-
+%%catalyst --start 2016-1-1 --end 2017-9-30 -x bitfinex -o dma.pickle
from catalyst.api import order, record, symbol, order_target
def initialize(context):
@@ -584,16 +582,16 @@ a function we use in the handle
context.asset = symbol('btc_usd')
def handle_data(context, data):
- # Skip first 150 days to get full windows
+ # Skip first 300 days to get full windows
context.i += 1
- if context.i < 150:
+ if context.i < 300:
return
# Compute averages
# data.history() has to be called with the same params
# from above and returns a pandas dataframe.
- short_mavg = data.history(context.asset, 'price', bar_count=50, frequency="1d").mean()
- long_mavg = data.history(context.asset, 'price', bar_count=150, frequency="1d").mean()
+ short_mavg = data.history(context.asset, 'price', bar_count=100, frequency="1d").mean()
+ long_mavg = data.history(context.asset, 'price', bar_count=300, frequency="1d").mean()
# Trading logic
if short_mavg > long_mavg:
@@ -610,7 +608,7 @@ a function we use in the handle
def analyze(context, perf):
import matplotlib.pyplot as plt
- fig = plt.figure(figsize=(12,12))
+ fig = plt.figure()
ax1 = fig.add_subplot(211)
perf.portfolio_value.plot(ax=ax1)
ax1.set_ylabel('portfolio value in $')
diff --git a/bundles.html b/bundles.html
index 2a7ee1fb..d50c3a91 100644
--- a/bundles.html
+++ b/bundles.html
@@ -108,6 +108,7 @@
Naming Convention
+Videos
diff --git a/development-guidelines.html b/development-guidelines.html
index 5ea81fab..463a4920 100644
--- a/development-guidelines.html
+++ b/development-guidelines.html
@@ -108,6 +108,7 @@
Naming Convention
+Videos
diff --git a/genindex.html b/genindex.html
index dc6bfbfe..11312940 100644
--- a/genindex.html
+++ b/genindex.html
@@ -78,10 +78,7 @@
OSX + virtualenv + matplotlib
-Windows
-
+Windows
Amazon Linux AMI
Troubleshooting pip Install
@@ -109,6 +106,11 @@
Naming Convention
+Videos
+
diff --git a/index.html b/index.html
index c29fbc4d..2a6f132d 100644
--- a/index.html
+++ b/index.html
@@ -78,10 +78,7 @@
OSX + virtualenv + matplotlib
-Windows
-
+Windows
Amazon Linux AMI
Troubleshooting pip Install
@@ -109,6 +106,11 @@
Naming Convention
+Videos
+
@@ -187,6 +189,7 @@ visualization of state-of-the-art trading systems.
Install
Catalyst Beginner Tutorial
Naming Convention
+Videos
diff --git a/install.html b/install.html
index a3c605b9..130b35d6 100644
--- a/install.html
+++ b/install.html
@@ -79,10 +79,7 @@
OSX + virtualenv + matplotlib
-Windows
-
+Windows
Amazon Linux AMI
Troubleshooting pip Install
@@ -110,6 +107,11 @@
Naming Convention
+Videos
+
@@ -175,10 +177,9 @@ your particular platform), you should be able to simply run
that you install in a virtualenv. The Hitchhiker’s Guide to
Python provides an excellent tutorial on virtualenv. Here’s a summarized
version:
-$ pip install virtualenv
-$ virtualenv catalyst-venv
+$ virtualenv catalyst-venv
$ source ./catalyst-venv/bin/activate
-$ pip install enigma-catalyst
+$ pip install enigma-
Though not required by Catalyst directly, our example algorithms use matplotlib
@@ -239,14 +240,6 @@ binary wheels for Python 2.7 packages. If it’s not already in your system,
it and install it before proceeding to the next step.
For windows, the easiest and best supported way to install Catalyst is to use
Conda.
-
-Troubleshooting Visual C++ Compiler Install¶
-We run into two different errors when trying to install the the Microsoft Visual C++
-Compiler for Python 2.7 mentioned above:
-
-
-
-
Amazon Linux AMI¶
diff --git a/naming-convention.html b/naming-convention.html
index f649816d..1f47762a 100644
--- a/naming-convention.html
+++ b/naming-convention.html
@@ -31,6 +31,7 @@
+
@@ -109,6 +110,7 @@
Naming Convention
+Videos
@@ -208,6 +210,8 @@ or any other cryptocurrency. Given its 1:1 mapping to the USD, is a viable alter