syntax.us Let the syntax do the talking
Blog Contact Posts Questions Tags Hire Me

Question:
Quantiacs On Linux Lesson 1?

Quantiacs is a startup which helps me use Data Science to invest in markets.

How to get started with Quantiacs on Linux?

I started this lesson by installing VirtualBox on my laptop:

https://www.virtualbox.org/wiki/Downloads

Inside of VirtualBox I installed Ubuntu 14:

http://releases.ubuntu.com/14.04/ubuntu-14.04.3-desktop-amd64.iso

I logged into Ubuntu and installed some packages:
apt-get install zip openssh-server emacs wget curl
Next I created an account named 'qq' which is the account I use when I work with Quantiacs:
useradd -m -s /bin/bash qq
passwd qq
Then, I logged into the qq account:
ssh -YA qq@localhost
Next, I downloaded Anaconda which contains Python:
mkdir -p ~qq/Downloads
cd       ~qq/Downloads
wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda-2.3.0-Linux-x86_64.sh
Then, I installed Anaconda Python:
cd   ~qq/Downloads
bash Anaconda-2.3.0-Linux-x86_64.sh
After the install I adjusted ~qq/.bashrc:
echo export PATH=${HOME}/anaconda/bin:{$PATH} >> ~qq/.bashrc
Also I did a bug-work-around in Anaconda:
mv ${HOME}/anaconda/bin/curl ${HOME}/anaconda/bin/curl_anaconda
And, I verified:
qq@nia110 ~ $ 
qq@nia110 ~ $ 
qq@nia110 ~ $ python
Python 2.7.10 |Anaconda 2.3.0 (64-bit)| (default, May 28 2015, 17:02:03) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
>>> 
qq@nia110 ~ $ 
qq@nia110 ~ $ 
qq@nia110 ~ $ 
I noticed that I installed Python 2.7.x.
Quantiacs wants me to have that version, not Python 3.x.y.

Next, I installed some Quantiacs software:
pip install quantiacsToolbox
Then, I downloaded demo software:
cd ~qq
wget https://quantiacs.com/Data/QuantiacsSampleTS.zip
unzip QuantiacsSampleTS.zip
I wrote a tiny Python script:

# ~/q10.py

import quantiacsToolbox
returnDict = quantiacsToolbox.runts('/home/qq/QuantiacsSampleTS/simpleTS.py')

# end
I ran a simple shell command to run my script:
python q10.py
I saw this syntax in my shell:
qq@nia110 ~ $ 
qq@nia110 ~ $ 
qq@nia110 ~ $ python q10.py
Downloading CASH
Downloading F_AD
Downloading F_BO
Downloading F_BP
Downloading F_C
Downloading F_CD
Downloading F_CL
Downloading F_DJ
Downloading F_EC
Downloading F_ES
Downloading F_FV
Downloading F_GC
Downloading F_HG
Downloading F_HO
Downloading F_LC
Downloading F_LN
Downloading F_NG
Downloading F_NQ
Downloading F_RB
Downloading F_S
Downloading F_SF
Downloading F_SI
Downloading F_SM
Downloading F_SP
Downloading F_TY
Downloading F_US
Downloading F_W
Downloading F_YM
Loading Data...
Done! 
Evaluating Trading System


Also, a window appeared:


That looked good so I was happy!


syntax.us Let the syntax do the talking
Blog Contact Posts Questions Tags Hire Me