NaN on PerformanceAnalyzer log
#3
Hi, for real operations with Trader plugin it works correctly before and after, but always reports NaN.

Here is more debug log.
I added a debug line in performanceAnalyzer.prototype.logRoundtripPart in order to log trade object and I discovered a NaN value for price atttibute.
Code:
2018-02-06 10:52:18 (INFO):     Trader Received advice to go short. Selling  ETH
2018-02-06 10:52:19 (INFO):     Attempting to SELL 1.46884272 ETH at Bitstamp price: 647.79
2018-02-06 10:52:36 (DEBUG):    Requested ETH/USD trade data from Bitstamp ...
2018-02-06 10:52:37 (DEBUG):    No new trades.
2018-02-06 10:52:56 (DEBUG):    Requested ETH/USD trade data from Bitstamp ...
2018-02-06 10:52:58 (DEBUG):    Processing 42 new trades. From 2018-02-06 09:52:08 UTC to 2018-02-06 09:52:35 UTC. (a few seconds)
2018-02-06 10:53:16 (DEBUG):    Requested ETH/USD trade data from Bitstamp ...
2018-02-06 10:53:18 (DEBUG):    Processing 41 new trades. From 2018-02-06 09:52:36 UTC to 2018-02-06 09:53:02 UTC. (a few seconds)
2018-02-06 10:53:19 (INFO):     SELL was successfull
2018-02-06 10:53:20 (INFO):     (PROFIT REPORT) original simulated balance:      1000.00000000 USD
2018-02-06 10:53:20 (INFO):     (PROFIT REPORT) current simulated balance:       961.01000000 USD
2018-02-06 10:53:20 (INFO):     (PROFIT REPORT) simulated profit:                -38.99000000 USD (-3.89900000%)
2018-02-06 10:53:20 (DEBUG):    trade { date: moment("2018-02-06T09:52:26.000"), price: NaN, portfolio: { currency: 961.01, asset: 0, balance: 961.01 }, balance: 961.01, action: 'sell' }
2018-02-06 10:53:20 (INFO):     (ROUNDTRIP) entry date (UTC)    exit date (UTC)         exposed duration        P&L     profit
2018-02-06 10:53:20 (INFO):     (ROUNDTRIP) 2018-02-06 00:34    2018-02-06 08:52        8 hours                 NaN     NaN
Maybe a problem on PortfolioManager when doing or checking order?


Instead, the simulation with PaperTrader reports correct P&L and profit values:
Code:
2018-02-05 21:08:11 (DEBUG):    Requested BTC/USD trade data from Bitstamp ...
2018-02-05 21:08:15 (DEBUG):    Processing 87 new trades. From 2018-02-05 20:07:47 UTC to 2018-02-05 20:08:06 UTC. (a few seconds)
2018-02-05 21:08:15 (INFO):     (PROFIT REPORT) original simulated balance:      1000.00000000 USD
2018-02-05 21:08:15 (INFO):     (PROFIT REPORT) current simulated balance:       1058.05192644 USD
2018-02-05 21:08:15 (INFO):     (PROFIT REPORT) simulated profit:                58.05192644 USD (5.80519264%)
2018-02-05 21:08:15 (INFO):     (ROUNDTRIP) entry date (UTC)    exit date (UTC)         exposed duration        P&L     profit
2018-02-05 21:08:15 (INFO):     (ROUNDTRIP) 2018-02-05 18:58    2018-02-05 19:58        an hour                 27.21   2.64
  Reply


Messages In This Thread
NaN on PerformanceAnalyzer log - by Lucas - 02-05-2018, 04:19 PM
RE: NaN on PerformanceAnalyzer log - by askmike - 02-06-2018, 03:59 AM
RE: NaN on PerformanceAnalyzer log - by Lucas - 02-06-2018, 11:50 PM
RE: NaN on PerformanceAnalyzer log - by askmike - 02-07-2018, 04:10 AM
RE: NaN on PerformanceAnalyzer log - by askmike - 02-07-2018, 04:11 AM
RE: NaN on PerformanceAnalyzer log - by askmike - 02-07-2018, 08:33 AM
RE: NaN on PerformanceAnalyzer log - by Lucas - 02-07-2018, 09:12 AM

Forum Jump:


Users browsing this thread: