Created
February 7, 2013 01:01
-
-
Save bjfish/4727457 to your computer and use it in GitHub Desktop.
Rough tutorial on how to run on picloud ...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Follow pre-reqs to setup picloud | |
http://docs.picloud.com/prereqs.html | |
# Create a new environment using Python 2.7 - Ubuntu Precise 12.04 | |
# Use the environment name below in _env | |
# Precise includes many required dependencies http://www.picloud.com/docs/base_environment/3/installed/ | |
http://docs.picloud.com/environment.html#environment-create | |
# SSH to environment and run | |
sudo pip install zipline | |
exit | |
# Be sure to save the environment in the web ui after this step | |
# The following quickstart.py is the same as the homepage with dma.run(data) removed at the end | |
python | |
>>>import cloud | |
>>>execfile('quickstart.py') | |
>>>jobid = cloud.call(dma.run, data, _env='Zipline', _type='f2') | |
>>> print cloud.status(jobid) | |
done | |
>>> print cloud.result(jobid) | |
<class 'pandas.core.frame.DataFrame'> | |
DatetimeIndex: 2268 entries, 1993-01-04 21:00:00 to 2001-12-31 21:00:00 | |
Data columns: | |
capital_used 2268 non-null values | |
cumulative_capital_used 2268 non-null values | |
ending_cash 2268 non-null values | |
ending_value 2268 non-null values | |
max_capital_used 2268 non-null values | |
max_leverage 2268 non-null values | |
period_close 2268 non-null values | |
period_open 2268 non-null values | |
pnl 2268 non-null values | |
portfolio_value 2268 non-null values | |
positions 2268 non-null values | |
returns 2268 non-null values | |
starting_cash 2268 non-null values | |
starting_value 2268 non-null values | |
transactions 2268 non-null values | |
dtypes: float64(11), object(4) | |
# What to improve | |
- Load data into PiCloud first and access data there | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment