Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Strange statistics #242

Closed
ymovlian opened this issue Jun 8, 2017 · 2 comments
Closed

Strange statistics #242

ymovlian opened this issue Jun 8, 2017 · 2 comments
Labels

Comments

@ymovlian
Copy link

ymovlian commented Jun 8, 2017

After a simulation I've got this result:

$ zenbot sim poloniex.BTC-USDT --currency_capital=0 --asset_capital=1
2017-06-08 14:59:51  2726.70000012 BTC-USDT   -0.9%      105    --       -0.0806   0.1000    +2.5%  0.96015 BTC     0.00004 USDT    +4.7%   -4.0%
{
  "asset_capital": 1,
  "buy_pct": 99,
  "buy_stop_pct": 0,
  "currency_capital": 0,
  "days": 14,
  "markup_pct": 0,
  "max_sell_loss_pct": 25,
  "max_slippage_pct": 5,
  "min_periods": 52,
  "mode": "sim",
  "neutral_rate": 0.1,
  "order_adjust_time": 30000,
  "oversold_rsi": 30,
  "oversold_rsi_periods": 20,
  "period": "10m",
  "profit_stop_enable_pct": 0,
  "profit_stop_pct": 1,
  "rsi_periods": 20,
  "selector": "poloniex.BTC-USDT",
  "sell_pct": 99,
  "sell_stop_pct": 0,
  "start": 1495670400000,
  "stats": false,
  "strategy": "trend_ema",
  "trend_ema": 20,
  "verbose": false
}
end balance: 2597.19480586 (3.85%)
buy hold: 2705.00000000 (8.16%)
vs. buy hold: -3.99%
69 trades over 14 days (avg 4.93 trades/day)
win/loss: 32/37
error rate: 53.62%

It says I have +4.7% profit. But in reality I have the following:
START BALANCE: 1BTC, 0$
END BALANCE: 0.96015BTC, 0.00004$

So, if I understand correctly, I lost 4%. Am I wrong?

@carlos8f
Copy link
Contributor

The profit figure is calculated from the asset value in currency, not the asset value alone. So since 8.16% buy/hold means the value of BTC went up 8% during the sim, you still have 4.7% profit despite the BTC balance being down to 0.96. You didn't lose 4%, you gained it, but if you would've bought/held instead you would've gained 8%.

The thing I can't explain is why the last line of the sim shows 4.7% profit but the stats show 3.85%. They should be equal or very close. If there's a way to replicate that issue I can try to fix it.

@ymovlian
Copy link
Author

Got it! Thanks a lot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants