https://github.com/dev360/fourierfx
Automatic generation of trade signals on stock and commodity prices
https://github.com/dev360/fourierfx
Last synced: about 1 year ago
JSON representation
Automatic generation of trade signals on stock and commodity prices
- Host: GitHub
- URL: https://github.com/dev360/fourierfx
- Owner: dev360
- Created: 2011-12-24T03:36:58.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2012-02-23T00:27:14.000Z (over 14 years ago)
- Last Synced: 2025-04-06T22:42:57.912Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 1.84 MB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
REQUIREMENTS
==============
1. ZeroMQ
Low-level library to build a messaging framework or client/server.
Install it from source and install some pre-reqs:
$ sudo apt-get install libtool uuid-dev autoconf automake
$ curl http://download.zeromq.org/zeromq-3.1.0-beta.tar.gz > zeromq.tar.gz
$ tar -xzf zeromq.tar.gz
$ cd zeromq-3.1.0
$ ./configure
$ make
$ make install
On OSX, you just need to install ossp-uuid with brew.
2. Haskell
Runs the server
Just get the latest version which comes bundled with cabal. Afaik version doesnt matter.
$ sudo apt-get update
$ sudo apt-get install ghc
3. Redis
Will be used to store quotes in.
$ sudo apt-get update
$ sudo apt-get install redis
RUNNING THE CODE
======================
0. Get and the data (a sample is found in the data folder).
1. Run qoute publisher server
$ easy_install virtualenv
$ cd FourierFx/cfg/ && virtualenv fourierfx --no-site-packages
Save yourself a lot of time and trouble, find your bash profile script
and add this alias which activates the virtualenv for you:
alias cd_fourierfx="cd ~/Projects/FourierFx/src/py/quotes && . ../../../cfg/fourierfx/bin/activate"
$ cd_fourierfx
$ pip -E fourierfx install -r pip.requirements.txt
$ cd FourierFx/src/py/
$ python quotes publisher --file=../../data/EURUSD_sample.csv --symbol=EURUSD --limit=100
2. Run quote analyzer client
Make sure you upgrade to GHC >== 7.2, it should come with Cabal.
$ cd FourierFx/src/hs/
$ cabal install
There will be a binary created in the dist folder; its usually like this:
$ FourierFx/src/hs/dist/build/fourierfx/fourierfx tcp://127.0.0.1:6000
3. Verifying that it worked:
You can use any redis client to verify that it works.
$ cd_fourierfx
$ python -c "from quotes.utils.redisdb import RedisDB as R; r = R(); print r.llen('symbol_EURUSD')"
$ python -c "from quotes.utils.redisdb import RedisDB as R; r = R(); print r.lrange('symbol_EURUSD', 0, 10)"
4. Deleting the quotes:
$ python -c "from quotes.utils.redisdb import RedisDB as R; r = R(); r.delete('symbol_EURUSD')"
NEXT STEPS
============
- Code that splits up Daily, hourly, and per minute data streams and initiates the corresponding computations.
I wrote the DatePart data structure with this in mind.