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:
Michael Halls-Moore
2015-05-15 13:50:34 +01:00
parent a03bc7a1fb
commit 4380200de7
8 changed files with 137 additions and 28 deletions
+2
View File
@@ -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
# =====================================