Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(*): new datasource api with transparent backtest to live transit…
…ion, explicit market scheme structure and management, various improvements related to data and apis
- Loading branch information
Showing
29 changed files
with
792 additions
and
532 deletions.
There are no files selected for viewing
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
{ | ||
"universe": "nasdaq,5", | ||
"end": "17h30", | ||
"modules": { | ||
"manager": "insights.managers.fair.Fair", | ||
"algorithm": "insights.algorithms.dummy.Random.BuyAndHold", | ||
"data": "insights.sources.hybridforex.ForexRates" | ||
}, | ||
"algorithm": { | ||
"start_day": -1, | ||
"rate": -1, | ||
"hipchat": false, | ||
"notify": false, | ||
"interactive": false, | ||
"save": false, | ||
}, | ||
"manager": { | ||
"cash": 10000, | ||
"perc_sell": 1.0, | ||
"max_weight": 0.3, | ||
"sell_scale": 100, | ||
"buy_scale": 150 | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
--- | ||
forex: | ||
timezone: null | ||
schedule: null | ||
benchmark: null | ||
pairs: | ||
- eur/usd | ||
- usd/jpy | ||
- gbp/usd | ||
- eur/gbp | ||
- usd/chf | ||
- eur/jpy | ||
- eur/chf | ||
- usd/cad | ||
- aud/usd | ||
- gbp/jpy | ||
- aud/cad | ||
- aud/chf | ||
- aud/jpy | ||
- aud/nzd | ||
- cad/chf | ||
- chf/jpy | ||
- eur/aud | ||
- eur/cad | ||
- eur/nok | ||
- eur/nzd | ||
- gbp/cad | ||
- gbp/chf | ||
- nzd/jpy | ||
- nzd/usd | ||
- usd/nok | ||
- usd/sek | ||
stocks: | ||
paris: | ||
# Paris not supported yet | ||
timezone: Europe/London | ||
schedule: '8h,16h30' | ||
code: epa | ||
benchmark: fchi | ||
cac40: | ||
#fp: | ||
#name: Total | ||
#sector: oil | ||
vk: | ||
name: Vallourec | ||
sector: engineering | ||
ml: | ||
name: Michelin | ||
sector: automobile | ||
#sol: | ||
#name: Solvay | ||
#sector: chemistry | ||
or: | ||
name: L'Oréal | ||
sector: home,hygiene | ||
#edf: | ||
#name: EDF - Electricite De France | ||
#sector: energy,public utility | ||
viv: | ||
name: Vivendi | ||
sector: medias | ||
#ul: | ||
#name: Unibail-Rodamco | ||
#sector: real estate | ||
#mt: | ||
#name: ArcelorMittal | ||
#sector: or,precious materials | ||
ri: | ||
name: Pernod-Ricard | ||
sector: food,drink | ||
#bn: | ||
#name: Danone | ||
#sector: food,drink | ||
ead: | ||
name: Airbus Group | ||
sector: transport | ||
#ef: | ||
#name: Essilor International | ||
#sector: services | ||
saf: | ||
name: Safran | ||
sector: engineering | ||
#gsz: | ||
#name: GDF Suez | ||
#sector: gaz,electricity,public,services | ||
#lr1: | ||
#name: Legrand | ||
#sector: electronic | ||
san: | ||
name: Sanofi | ||
sector: pharmacy | ||
su: | ||
name: Schneider Electric | ||
sector: engineering | ||
sgo: | ||
name: Saint-Gobain | ||
sector: engineering | ||
#gt1: | ||
#name: Gemalto | ||
#sector: electronic | ||
ai: | ||
name: Air Liquide | ||
sector: chemistry | ||
#vie: | ||
#name: Veolia Environment | ||
#sector: gaz,electricity,services | ||
#mv: | ||
#name: LVMH - Moet Hennessy Louis Vuitton | ||
#sector: sell | ||
pub: | ||
name: Publicis Groupe | ||
sector: medias | ||
#dg: | ||
#name: Vinci | ||
#sector: engineering | ||
#pp: | ||
#name: Kering | ||
#sector: construction,materials,real estate | ||
tec: | ||
name: Technip | ||
sector: engineering | ||
rno: | ||
name: Renault | ||
sector: automobile | ||
#cap: | ||
#name: Cap Gemini | ||
#sector: information technology | ||
#alu: | ||
#name: Alcatel-Lucent | ||
#sector: telecommunications | ||
alo: | ||
name: Alstom | ||
sector: engineering | ||
cs: | ||
name: AXA | ||
sector: finance | ||
#fte: | ||
#name: Orange | ||
#sector: telecommunications | ||
#ca: | ||
#name: Carrefour | ||
#sector: sell | ||
#bnp: | ||
#name: BNP Paribas | ||
#sector: finance | ||
#gle: | ||
#name: Societe Generale | ||
#sector: finance | ||
#aca: | ||
#name: Credit agricole | ||
#sector: finance | ||
lg: | ||
name: Lafarge | ||
sector: construction,materials,real estate | ||
en: | ||
name: Bouygues | ||
sector: engineering | ||
#ac: | ||
#name: Accor | ||
#sector: services | ||
sbf120: [] | ||
srd: [] | ||
nasdaq: | ||
code: NASDAQ | ||
timezone: US/Eastern | ||
benchmark: ^GSPC | ||
nasdaq100: [] | ||
others: [] | ||
london: | ||
ftse100: [] | ||
others: [] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ flake8==2.1.0 | |
coveralls==0.4.1 | ||
ipdb==0.8 | ||
piprot==0.5.0 | ||
radon==0.5 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim:fenc=utf-8 | ||
|
||
''' | ||
Intuition analysis module | ||
------------------------- | ||
Provides high level building blocks to extract insights from various datasets | ||
:copyright (c) 2014 Xavier Bruhiere | ||
:license: Apache 2.0, see LICENSE for more details. | ||
''' | ||
|
||
import os | ||
import shutil | ||
import rpy2.robjects as robjects | ||
import dna.logging | ||
|
||
log = dna.logging.logger(__name__) | ||
|
||
|
||
class Stocks(object): | ||
''' Produce R report of stocks opportunities ''' | ||
knitr_report = '~/.intuition/assets/report.rnw' | ||
|
||
def __init__(self, report_template=None): | ||
log.info('loading R context') | ||
self.r = robjects.r | ||
self.report_template = report_template \ | ||
or os.path.expanduser(self.knitr_report) | ||
self.r('require("knitr")') | ||
|
||
def clean(self, everything=False): | ||
log.debug('cleaning garbage') | ||
for extension in ['aux', 'log', 'out', 'tex']: | ||
os.remove('report.{}'.format(extension)) | ||
if everything: | ||
os.remove('report.{}'.format('pdf')) | ||
|
||
shutil.rmtree('figure') | ||
|
||
def process(self): | ||
log.info('processing report') | ||
self.r('knit2pdf("{}")'.format(self.report_template)) |
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
Oops, something went wrong.