Пример #1
0
 def __init__(self):
     self.todayTrading = tm.TradingDay()
     #create a new account/portfolio
     self.act = accts.Account()
Пример #2
0
import requests
imp.reload(eu)

retm = rm.RetrieveMarkets()
retm.getCurrentPrice('ETH')
test = retm.getCurrencies()
df = retm.df_active
type(df.loc[35, 'Currency'])

diag = eu.Dialogue()
diag.engageUser()
#TODO check the trade log to ensure that all the trade data looks appropriate, then build the interace with the db

#test the p&l calculations... create a portfolio of accounts
''' testing the accounts class '''
act = accts.Account()
act.positions = {
    'QWARK': {
        'coins': 200000.0,
        'notional': 2.028,
        'original_direction': 'long',
        'realized_pl': 0,
        'vwap': 1.014e-05
    },
    'LTC': {
        'coins': 40000.0,
        'notional': 6.804,
        'original_direction': 'long',
        'realized_pl': 0,
        'vwap': 0.01701
    }