Guest User

jesse_ema_50_4h_strategy_debug

a guest
Feb 10th, 2021
8
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (venv) mkubuntu@mkubuntu:~/projects/trading/jesse_backtesting/jesse_project_trading$ jesse backtest '2019-05-24' '2019-06-02' --debug
  2. loading candles...
  3. CANDLES |
  4. ----------------------+--------------------------
  5. period | 9 days
  6. starting-ending date | 2019-05-24 => 2019-06-02
  7.  
  8.  
  9. exchange | symbol | timeframe | strategy | DNA
  10. ------------+----------+-------------+-----------------+-------
  11. Bitfinex | BTC-USD | 4h | ExampleStrategy |
  12.  
  13.  
  14. Symbol | timestamp | open | close | high | low | volume
  15. Initiated ExampleStrategy
  16. [2019-05-24T00:00:00+00:00]: Saved daily portfolio balance: 4000
  17. ==== BTC-USD | 2019-05-24T00:00 | 7876.8 | 7875.2 | 7938.3 | 7830.0 | 1008.88
  18. [2019-05-24T04:00:00+00:00]: SUBMITTED order: BTC-USD, MARKET, buy, 0.5079236082893133, $7875.2
  19. [2019-05-24T04:00:00+00:00]: EXECUTED order: BTC-USD, MARKET, buy, 0.5079236082893133, $7875.2
  20. [2019-05-24T04:00:00+00:00]: Charged 12.0 as fee. Balance for USD on Bitfinex changed from 4000 to 3988.0
  21. [2019-05-24T04:00:00+00:00]: OPENED long position: Bitfinex, BTC-USD, 0.5079236082893133, $7875.2
  22. [2019-05-24T04:00:00+00:00]: SUBMITTED order: BTC-USD, STOP, sell, -0.5079236082893133, $6300.16
  23. ==== BTC-USD | 2019-05-24T04:00 | 7875.2 | 7886.5 | 7912.0 | 7784.5 | 861.26
  24.  
  25. Time 2019-05-24 06:00:00: We have a buy, ema_value_50_4h = 7707.2033883517315, price = 7886.5, position = 5.7395367736694425
  26. ==== BTC-USD | 2019-05-24T08:00 | 7886.5 | 8024.1 | 8081.741 | 7886.4 | 2485.33
  27.  
  28. Time 2019-05-24 10:00:00: We have a buy, ema_value_50_4h = 7719.630706455585, price = 8024.1, position = 75.62982527427903
  29. ==== BTC-USD | 2019-05-24T12:00 | 8024.1 | 8102.2 | 8153.5 | 7979.5 | 2733.81
  30.  
  31. Time 2019-05-24 14:00:00: We have a buy, ema_value_50_4h = 7734.633423849484, price = 8102.2, position = 115.29865908167403
  32. ==== BTC-USD | 2019-05-24T16:00 | 8102.2 | 8057.0 | 8158.6 | 8005.0 | 1607.79
  33.  
  34. Time 2019-05-24 18:00:00: We have a buy, ema_value_50_4h = 7747.27525036519, price = 8057.0, position = 92.34051198699763
  35. ==== BTC-USD | 2019-05-24T20:00 | 8057.0 | 7990.0 | 8119.2 | 7933.8594 | 2229.19
  36.  
  37. Time 2019-05-24 22:00:00: We have a buy, ema_value_50_4h = 7756.793867997928, price = 7990.0, position = 58.30963023161348
  38. [2019-05-25T00:01:00+00:00]: Saved daily portfolio balance: 4042.75
  39. ==== BTC-USD | 2019-05-25T00:00 | 7990.0 | 8010.7 | 8070.0 | 7961.1 | 604.77
  40.  
  41. Time 2019-05-25 02:00:00: We have a buy, ema_value_50_4h = 7766.750971213695, price = 8010.7, position = 68.8236489232022
  42. ==== BTC-USD | 2019-05-25T04:00 | 8010.7 | 7994.9346 | 8055.2 | 7950.0 | 725.0
  43.  
  44. Time 2019-05-25 06:00:00: We have a buy, ema_value_50_4h = 7775.699348813158, price = 7994.9346, position = 60.8160300690779
  45. ==== BTC-USD | 2019-05-25T08:00 | 7994.9346 | 8095.2 | 8135.2 | 7973.5 | 1047.66
  46.  
  47. Time 2019-05-25 10:00:00: We have a buy, ema_value_50_4h = 7788.228786114603, price = 8095.2, position = 111.74319382364911
  48. ==== BTC-USD | 2019-05-25T12:00 | 8095.2 | 8057.0 | 8100.0 | 8027.1 | 620.1
  49.  
  50. Time 2019-05-25 14:00:00: We have a buy, ema_value_50_4h = 7798.7688337179525, price = 8057.0, position = 92.34051198699763
  51. ==== BTC-USD | 2019-05-25T16:00 | 8057.0 | 7990.6 | 8090.0 | 7963.2 | 927.17
  52.  
  53. Time 2019-05-25 18:00:00: We have a buy, ema_value_50_4h = 7806.291624552543, price = 7990.6, position = 58.61438439658741
  54. ==== BTC-USD | 2019-05-25T20:00 | 7990.6 | 8055.0 | 8068.9 | 7990.6 | 411.43
  55.  
  56. Time 2019-05-25 22:00:00: We have a buy, ema_value_50_4h = 7816.044894177933, price = 8055.0, position = 91.32466477041862
  57. [2019-05-26T00:01:00+00:00]: Saved daily portfolio balance: 4079.32
  58. ==== BTC-USD | 2019-05-26T00:00 | 8055.0 | 7990.3 | 8058.0 | 7978.1 | 620.85
  59.  
  60. Time 2019-05-26 02:00:00: We have a buy, ema_value_50_4h = 7822.878427739583, price = 7990.3, position = 58.46200731410045
  61. ==== BTC-USD | 2019-05-26T04:00 | 7990.3 | 8001.1 | 8026.6 | 7950.0 | 489.11
  62.  
  63. Time 2019-05-26 06:00:00: We have a buy, ema_value_50_4h = 7829.867509004697, price = 8001.1, position = 63.9475822836248
  64. ==== BTC-USD | 2019-05-26T08:00 | 8001.1 | 7923.9 | 8017.9 | 7877.939 | 2272.68
  65.  
  66. Time 2019-05-26 10:00:00: We have a buy, ema_value_50_4h = 7833.555057671179, price = 7923.9, position = 24.735879723689777
  67. ==== BTC-USD | 2019-05-26T12:00 | 7923.9 | 8008.9 | 8023.6 | 7897.0 | 632.36
  68.  
  69. Time 2019-05-26 14:00:00: We have a buy, ema_value_50_4h = 7840.431329919368, price = 8008.9, position = 67.90938642828132
  70. ==== BTC-USD | 2019-05-26T16:00 | 8008.9 | 8567.667 | 8600.0 | 7988.9 | 8261.78
  71.  
  72. Time 2019-05-26 18:00:00: We have a buy, ema_value_50_4h = 7868.950375804883, price = 8567.667, position = 351.7203372612762
  73. ==== BTC-USD | 2019-05-26T20:00 | 8567.667 | 8729.871 | 8828.0 | 8513.842 | 7881.39
  74.  
  75. Time 2019-05-26 22:00:00: We have a buy, ema_value_50_4h = 7902.711968910574, price = 8729.871, position = 434.1075782202356
  76. [2019-05-27T00:01:00+00:00]: Saved daily portfolio balance: 4435.89
  77. ==== BTC-USD | 2019-05-27T00:00 | 8729.871 | 8768.1 | 8958.3 | 8723.3 | 5697.39
  78.  
  79. Time 2019-05-27 02:00:00: We have a buy, ema_value_50_4h = 7936.648754443492, price = 8768.1, position = 453.52498984152817
  80. ==== BTC-USD | 2019-05-27T04:00 | 8768.1 | 8789.8 | 8831.0 | 8706.1 | 1106.35
  81.  
  82. Time 2019-05-27 06:00:00: We have a buy, ema_value_50_4h = 7970.105666033944, price = 8789.8, position = 464.54693214140616
  83. ==== BTC-USD | 2019-05-27T08:00 | 8789.8 | 8740.9 | 8800.6 | 8693.9 | 1833.13
  84.  
  85. Time 2019-05-27 10:00:00: We have a buy, ema_value_50_4h = 8000.3328948169265, price = 8740.9, position = 439.70946769605825
  86. ==== BTC-USD | 2019-05-27T12:00 | 8740.9 | 8849.4 | 8918.8 | 8740.9 | 3129.18
  87.  
  88. Time 2019-05-27 14:00:00: We have a buy, ema_value_50_4h = 8033.629644039792, price = 8849.4, position = 494.8191791954491
  89. ==== BTC-USD | 2019-05-27T16:00 | 8849.4 | 8821.061 | 8930.0 | 8650.0 | 4194.56
  90.  
  91. Time 2019-05-27 18:00:00: We have a buy, ema_value_50_4h = 8064.509305057839, price = 8821.061, position = 480.42513206013837
  92. ==== BTC-USD | 2019-05-27T20:00 | 8821.061 | 8806.1 | 8871.3 | 8721.9 | 1601.27
  93.  
  94. Time 2019-05-27 22:00:00: We have a buy, ema_value_50_4h = 8093.591293094786, price = 8806.1, position = 472.82608695652243
  95. [2019-05-28T00:01:00+00:00]: Saved daily portfolio balance: 4460.78
  96. ==== BTC-USD | 2019-05-28T00:00 | 8806.1 | 8809.0 | 8846.9 | 8768.0 | 791.84
  97.  
  98. Time 2019-05-28 02:00:00: We have a buy, ema_value_50_4h = 8121.646536502833, price = 8809.0, position = 474.29906542056096
  99. ==== BTC-USD | 2019-05-28T04:00 | 8809.0 | 8762.487 | 8840.1 | 8688.3 | 2234.8
  100.  
  101. Time 2019-05-28 06:00:00: We have a buy, ema_value_50_4h = 8146.77753507135, price = 8762.487, position = 450.67401462819953
  102. ==== BTC-USD | 2019-05-28T08:00 | 8762.487 | 8780.0 | 8794.3 | 8700.0 | 1468.84
  103.  
  104. Time 2019-05-28 10:00:00: We have a buy, ema_value_50_4h = 8171.609788597963, price = 8780.0, position = 459.5692807801711
  105. ==== BTC-USD | 2019-05-28T12:00 | 8780.0 | 8727.1 | 8789.3 | 8517.4 | 3277.55
  106.  
  107. Time 2019-05-28 14:00:00: We have a buy, ema_value_50_4h = 8193.393718456868, price = 8727.1, position = 432.7001219016661
  108. ==== BTC-USD | 2019-05-28T16:00 | 8727.1 | 8712.0 | 8820.4 | 8626.3 | 2370.48
  109.  
  110. Time 2019-05-28 18:00:00: We have a buy, ema_value_50_4h = 8213.731219693853, price = 8712.0, position = 425.03047541649767
  111. ==== BTC-USD | 2019-05-28T20:00 | 8712.0 | 8738.1 | 8757.0 | 8677.0 | 995.97
  112.  
  113. Time 2019-05-28 22:00:00: We have a buy, ema_value_50_4h = 8234.294701274486, price = 8738.1, position = 438.287281592849
  114. [2019-05-29T00:01:00+00:00]: Saved daily portfolio balance: 4404.29
  115. ==== BTC-USD | 2019-05-29T00:00 | 8738.1 | 8664.0 | 8738.1 | 8633.0 | 890.26
  116.  
  117. Time 2019-05-29 02:00:00: We have a buy, ema_value_50_4h = 8251.1458894598, price = 8664.0, position = 400.65014221861065
  118. ==== BTC-USD | 2019-05-29T04:00 | 8664.0 | 8582.7 | 8669.9 | 8455.0 | 3830.7
  119.  
  120. Time 2019-05-29 06:00:00: We have a buy, ema_value_50_4h = 8264.148011441768, price = 8582.7, position = 359.3559528646897
  121. ==== BTC-USD | 2019-05-29T08:00 | 8582.7 | 8661.0 | 8722.8 | 8569.5 | 1778.09
  122.  
  123. Time 2019-05-29 10:00:00: We have a buy, ema_value_50_4h = 8279.710834522482, price = 8661.0, position = 399.12637139374283
  124. ==== BTC-USD | 2019-05-29T12:00 | 8661.0 | 8717.644 | 8796.5 | 8654.0 | 1685.7
  125.  
  126. Time 2019-05-29 14:00:00: We have a buy, ema_value_50_4h = 8296.884684149052, price = 8717.644, position = 427.8971962616829
  127. ==== BTC-USD | 2019-05-29T16:00 | 8717.644 | 8716.0 | 8760.0 | 8661.0 | 1064.59
  128.  
  129. Time 2019-05-29 18:00:00: We have a buy, ema_value_50_4h = 8313.320578888304, price = 8716.0, position = 427.06216984965477
  130. ==== BTC-USD | 2019-05-29T20:00 | 8716.0 | 8678.0 | 8742.0 | 8625.338 | 1053.28
  131.  
  132. Time 2019-05-29 22:00:00: We have a buy, ema_value_50_4h = 8327.62173265739, price = 8678.0, position = 407.7610727346614
  133. [2019-05-30T00:01:00+00:00]: Saved daily portfolio balance: 4393.02
  134. ==== BTC-USD | 2019-05-30T00:00 | 8678.0 | 8715.7 | 8759.1 | 8573.5 | 1614.03
  135.  
  136. Time 2019-05-30 02:00:00: We have a buy, ema_value_50_4h = 8342.840488239453, price = 8715.7, position = 426.9097927671687
  137. ==== BTC-USD | 2019-05-30T04:00 | 8715.7 | 8744.9 | 8790.0 | 8696.0 | 689.82
  138.  
  139. Time 2019-05-30 06:00:00: We have a buy, ema_value_50_4h = 8358.607527916338, price = 8744.9, position = 441.74116212921626
  140. ==== BTC-USD | 2019-05-30T08:00 | 8744.9 | 8744.1 | 8819.7 | 8687.0 | 1659.95
  141.  
  142. Time 2019-05-30 10:00:00: We have a buy, ema_value_50_4h = 8373.724879762756, price = 8744.1, position = 441.33482324258466
  143. ==== BTC-USD | 2019-05-30T12:00 | 8744.1 | 8964.2 | 8970.6 | 8713.9 | 1890.65
  144.  
  145. Time 2019-05-30 14:00:00: We have a buy, ema_value_50_4h = 8396.880766830884, price = 8964.2, position = 553.1288094270626
  146. ==== BTC-USD | 2019-05-30T16:00 | 8964.2 | 8610.91 | 9109.0 | 8530.5 | 6482.45
  147.  
  148. Time 2019-05-30 18:00:00: We have a buy, ema_value_50_4h = 8405.274070092417, price = 8610.91, position = 373.68447785453054
  149. ==== BTC-USD | 2019-05-30T20:00 | 8610.91 | 8270.0 | 8611.0 | 8005.0 | 7952.95
  150.  
  151. Time 2019-05-30 22:00:00: We have a buy, ema_value_50_4h = 8399.969204598596, price = 8270.0, position = 200.5282405526209
  152. [2019-05-31T00:00:00+00:00]: SUBMITTED order: BTC-USD, MARKET, sell, -0.5079236082893133, $8270.0
  153. [2019-05-31T00:00:00+00:00]: EXECUTED order: BTC-USD, MARKET, sell, -0.5079236082893133, $8270.0
  154. [2019-05-31T00:00:00+00:00]: Charged 12.6 as fee. Balance for USD on Bitfinex changed from 3988.0 to 3975.4
  155. [2019-05-31T00:00:00+00:00]: Added realized PNL of 200.53. Balance for USD on Bitfinex changed from 3975.4 to 4175.93
  156. [2019-05-31T00:00:00+00:00]: CLOSED long position: Bitfinex, BTC-USD. PNL: $200.53, entry: 7875.2, exit: 8270.0
  157. [2019-05-31T00:00:00+00:00]: Take-profit order has been executed.
  158. [2019-05-31T00:00:00+00:00]: cancel all remaining orders to prepare for a fresh start...
  159. [2019-05-31T00:00:00+00:00]: CANCELED order: BTC-USD, STOP, sell, -0.5079236082893133, $6300.16
  160. [2019-05-31T00:01:00+00:00]: Saved daily portfolio balance: 4175.93
  161. ==== BTC-USD | 2019-05-31T00:00 | 8270.0 | 8255.9 | 8367.0 | 8200.948 | 1702.44
  162. ==== BTC-USD | 2019-05-31T04:00 | 8255.9 | 8292.6 | 8318.789 | 8099.9 | 1970.58
  163. ==== BTC-USD | 2019-05-31T08:00 | 8292.6 | 8248.9 | 8329.4 | 8191.6 | 1577.44
  164. ==== BTC-USD | 2019-05-31T12:00 | 8248.9 | 8326.0 | 8432.9 | 8239.0 | 2839.02
  165. ==== BTC-USD | 2019-05-31T16:00 | 8326.0 | 8417.9 | 8450.0 | 8265.0 | 1244.8
  166. [2019-05-31T20:00:00+00:00]: SUBMITTED order: BTC-USD, MARKET, buy, 0.49750294016322366, $8417.9
  167. [2019-05-31T20:00:00+00:00]: EXECUTED order: BTC-USD, MARKET, buy, 0.49750294016322366, $8417.9
  168. [2019-05-31T20:00:00+00:00]: Charged 12.56 as fee. Balance for USD on Bitfinex changed from 4175.93 to 4163.36
  169. [2019-05-31T20:00:00+00:00]: OPENED long position: Bitfinex, BTC-USD, 0.49750294016322366, $8417.9
  170. [2019-05-31T20:00:00+00:00]: SUBMITTED order: BTC-USD, STOP, sell, -0.49750294016322366, $6734.32
  171. ==== BTC-USD | 2019-05-31T20:00 | 8417.9 | 8532.666 | 8550.0 | 8412.5 | 1595.53
  172.  
  173. Time 2019-05-31 22:00:00: We have a buy, ema_value_50_4h = 8389.703163720424, price = 8532.666, position = 57.09642243077269
  174. [2019-06-01T00:01:00+00:00]: Saved daily portfolio balance: 4213.92
  175. ==== BTC-USD | 2019-06-01T00:00 | 8532.666 | 8539.0 | 8570.0 | 8485.0 | 1146.17
  176.  
  177. Time 2019-06-01 02:00:00: We have a buy, ema_value_50_4h = 8395.55794161374, price = 8539.0, position = 60.2476060537665
  178. ==== BTC-USD | 2019-06-01T04:00 | 8539.0 | 8531.9 | 8552.0 | 8451.0 | 757.73
  179.  
  180. Time 2019-06-01 06:00:00: We have a buy, ema_value_50_4h = 8400.904689001438, price = 8531.9, position = 56.71533517860735
  181. ==== BTC-USD | 2019-06-01T08:00 | 8531.9 | 8561.0 | 8625.7 | 8510.0 | 928.92
  182.  
  183. Time 2019-06-01 10:00:00: We have a buy, ema_value_50_4h = 8407.182936491577, price = 8561.0, position = 71.19267073735773
  184. ==== BTC-USD | 2019-06-01T12:00 | 8561.0 | 8530.0 | 8572.0 | 8454.1 | 1212.95
  185.  
  186. Time 2019-06-01 14:00:00: We have a buy, ema_value_50_4h = 8411.99929192328, price = 8530.0, position = 55.77007959229741
  187. ==== BTC-USD | 2019-06-01T16:00 | 8530.0 | 8521.0 | 8580.0 | 8470.0 | 600.8
  188.  
  189. Time 2019-06-01 18:00:00: We have a buy, ema_value_50_4h = 8416.273829494918, price = 8521.0, position = 51.29255313082831
  190. ==== BTC-USD | 2019-06-01T20:00 | 8521.0 | 8547.0 | 8615.1 | 8518.0 | 810.75
  191.  
  192. Time 2019-06-01 22:00:00: We have a buy, ema_value_50_4h = 8421.400345985314, price = 8547.0, position = 64.22762957507257
  193.  
  194.  
  195. Executed backtest simulation in: 0.43 seconds
  196. [2019-06-02T00:00:00+00:00]: Terminating strategy...
  197. Backtest done
  198. [2019-06-02T00:00:00+00:00]: Closed open Bitfinex-BTC-USD position at 8547.0 with PNL: 64.2276(1.53%) because we reached the end of the backtest session.
  199. [2019-06-02T00:00:00+00:00]: SUBMITTED order: BTC-USD, MARKET, sell, -0.49750294016322366, $8547.0
  200. [2019-06-02T00:00:00+00:00]: EXECUTED order: BTC-USD, MARKET, sell, -0.49750294016322366, $8547.0
  201. [2019-06-02T00:00:00+00:00]: Charged 12.76 as fee. Balance for USD on Bitfinex changed from 4163.36 to 4150.61
  202. [2019-06-02T00:00:00+00:00]: Added realized PNL of 64.23. Balance for USD on Bitfinex changed from 4150.61 to 4214.83
  203. [2019-06-02T00:00:00+00:00]: CLOSED long position: Bitfinex, BTC-USD. PNL: $64.23, entry: 8417.9, exit: 8547.0
  204. [2019-06-02T00:00:00+00:00]: Saved daily portfolio balance: 4214.83
  205.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×