Added the ability for the backtester to use unrealised PnL from the Position objects to calculate a tick-by-tick equity curve. Added a performance directory that calculates drawdown statistics. Modified the output.py script to use Seaborn and output the equity curve, returns and drawdown curve.
This commit is contained in:
@@ -11,6 +11,7 @@ class TickerMock(object):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.pairs = ["GBPUSD", "EURUSD"]
|
||||
self.prices = {
|
||||
"GBPUSD": {"bid": Decimal("1.50328"), "ask": Decimal("1.50349")},
|
||||
"USDGBP": {"bid": Decimal("0.66521"), "ask": Decimal("0.66512")},
|
||||
@@ -18,6 +19,7 @@ class TickerMock(object):
|
||||
}
|
||||
|
||||
|
||||
|
||||
# =====================================
|
||||
# GBP Home Currency with GBP/USD traded
|
||||
# =====================================
|
||||
|
||||
Reference in New Issue
Block a user