openbacktesting 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. openbacktesting/__init__.py +85 -0
  2. openbacktesting/aggregation.py +8 -0
  3. openbacktesting/broker/__init__.py +54 -0
  4. openbacktesting/broker/commission.py +57 -0
  5. openbacktesting/broker/core.py +1122 -0
  6. openbacktesting/broker/execution.py +62 -0
  7. openbacktesting/broker/instrument.py +106 -0
  8. openbacktesting/broker/ledger.py +60 -0
  9. openbacktesting/broker/models.py +236 -0
  10. openbacktesting/broker/observations.py +99 -0
  11. openbacktesting/broker/requests.py +192 -0
  12. openbacktesting/broker/sizing.py +76 -0
  13. openbacktesting/colors.py +175 -0
  14. openbacktesting/data/__init__.py +20 -0
  15. openbacktesting/data/aggregation.py +39 -0
  16. openbacktesting/data/context.py +30 -0
  17. openbacktesting/data/core.py +218 -0
  18. openbacktesting/data/generators.py +54 -0
  19. openbacktesting/data/strategy_data.py +103 -0
  20. openbacktesting/data/timeframe.py +69 -0
  21. openbacktesting/engine.py +34 -0
  22. openbacktesting/helpers.py +77 -0
  23. openbacktesting/indicator_api.py +10 -0
  24. openbacktesting/indicator_methods.py +123 -0
  25. openbacktesting/indicator_types.py +19 -0
  26. openbacktesting/indicators/__init__.py +7 -0
  27. openbacktesting/indicators/api.py +97 -0
  28. openbacktesting/indicators/calculus.py +75 -0
  29. openbacktesting/indicators/candles/__init__.py +0 -0
  30. openbacktesting/indicators/candles/cdl_doji.py +17 -0
  31. openbacktesting/indicators/candles/cdl_engulfing.py +14 -0
  32. openbacktesting/indicators/candles/cdl_eveningstar.py +15 -0
  33. openbacktesting/indicators/candles/cdl_hammer.py +14 -0
  34. openbacktesting/indicators/candles/cdl_harami.py +14 -0
  35. openbacktesting/indicators/candles/cdl_inside.py +14 -0
  36. openbacktesting/indicators/candles/cdl_marubozu.py +14 -0
  37. openbacktesting/indicators/candles/cdl_morningstar.py +15 -0
  38. openbacktesting/indicators/candles/cdl_shootingstar.py +14 -0
  39. openbacktesting/indicators/candles/cdl_z.py +28 -0
  40. openbacktesting/indicators/candles/ha.py +19 -0
  41. openbacktesting/indicators/catalog.json +8348 -0
  42. openbacktesting/indicators/common.py +94 -0
  43. openbacktesting/indicators/cycles/__init__.py +0 -0
  44. openbacktesting/indicators/cycles/dsp.py +10 -0
  45. openbacktesting/indicators/cycles/ebsw.py +10 -0
  46. openbacktesting/indicators/cycles/ht_dcperiod.py +10 -0
  47. openbacktesting/indicators/cycles/ht_dcphase.py +10 -0
  48. openbacktesting/indicators/cycles/ht_phasor.py +17 -0
  49. openbacktesting/indicators/cycles/ht_sine.py +17 -0
  50. openbacktesting/indicators/cycles/ht_trendmode.py +10 -0
  51. openbacktesting/indicators/cycles/msw.py +19 -0
  52. openbacktesting/indicators/methods.py +5762 -0
  53. openbacktesting/indicators/momentum/__init__.py +0 -0
  54. openbacktesting/indicators/momentum/ac.py +9 -0
  55. openbacktesting/indicators/momentum/ao.py +10 -0
  56. openbacktesting/indicators/momentum/apo.py +10 -0
  57. openbacktesting/indicators/momentum/bias.py +10 -0
  58. openbacktesting/indicators/momentum/bop.py +10 -0
  59. openbacktesting/indicators/momentum/brar.py +26 -0
  60. openbacktesting/indicators/momentum/cci.py +10 -0
  61. openbacktesting/indicators/momentum/cfo.py +10 -0
  62. openbacktesting/indicators/momentum/cg.py +10 -0
  63. openbacktesting/indicators/momentum/cmo.py +10 -0
  64. openbacktesting/indicators/momentum/coppock.py +10 -0
  65. openbacktesting/indicators/momentum/crsi.py +28 -0
  66. openbacktesting/indicators/momentum/cti.py +10 -0
  67. openbacktesting/indicators/momentum/dm.py +17 -0
  68. openbacktesting/indicators/momentum/er.py +10 -0
  69. openbacktesting/indicators/momentum/eri.py +17 -0
  70. openbacktesting/indicators/momentum/fisher.py +17 -0
  71. openbacktesting/indicators/momentum/fosc.py +10 -0
  72. openbacktesting/indicators/momentum/gator.py +13 -0
  73. openbacktesting/indicators/momentum/ibs.py +7 -0
  74. openbacktesting/indicators/momentum/inertia.py +22 -0
  75. openbacktesting/indicators/momentum/kdj.py +18 -0
  76. openbacktesting/indicators/momentum/kst.py +30 -0
  77. openbacktesting/indicators/momentum/lrsi.py +10 -0
  78. openbacktesting/indicators/momentum/macd.py +27 -0
  79. openbacktesting/indicators/momentum/macdext.py +27 -0
  80. openbacktesting/indicators/momentum/macdfix.py +18 -0
  81. openbacktesting/indicators/momentum/mom.py +10 -0
  82. openbacktesting/indicators/momentum/pgo.py +10 -0
  83. openbacktesting/indicators/momentum/pmo.py +13 -0
  84. openbacktesting/indicators/momentum/po.py +10 -0
  85. openbacktesting/indicators/momentum/ppo.py +20 -0
  86. openbacktesting/indicators/momentum/psl.py +12 -0
  87. openbacktesting/indicators/momentum/pvo.py +20 -0
  88. openbacktesting/indicators/momentum/qqe.py +31 -0
  89. openbacktesting/indicators/momentum/rci.py +20 -0
  90. openbacktesting/indicators/momentum/rmi.py +7 -0
  91. openbacktesting/indicators/momentum/roc.py +10 -0
  92. openbacktesting/indicators/momentum/rocp.py +10 -0
  93. openbacktesting/indicators/momentum/rocr.py +10 -0
  94. openbacktesting/indicators/momentum/rocr100.py +10 -0
  95. openbacktesting/indicators/momentum/rsi.py +10 -0
  96. openbacktesting/indicators/momentum/rsx.py +10 -0
  97. openbacktesting/indicators/momentum/rvgi.py +26 -0
  98. openbacktesting/indicators/momentum/slope.py +17 -0
  99. openbacktesting/indicators/momentum/smc_sweep.py +18 -0
  100. openbacktesting/indicators/momentum/smi.py +21 -0
  101. openbacktesting/indicators/momentum/smi_stochastic.py +15 -0
  102. openbacktesting/indicators/momentum/squeeze.py +47 -0
  103. openbacktesting/indicators/momentum/squeeze_pro.py +53 -0
  104. openbacktesting/indicators/momentum/stc.py +20 -0
  105. openbacktesting/indicators/momentum/stoch.py +19 -0
  106. openbacktesting/indicators/momentum/stochf.py +19 -0
  107. openbacktesting/indicators/momentum/stochrsi.py +19 -0
  108. openbacktesting/indicators/momentum/td_seq.py +17 -0
  109. openbacktesting/indicators/momentum/trix.py +19 -0
  110. openbacktesting/indicators/momentum/trixh.py +20 -0
  111. openbacktesting/indicators/momentum/tsi.py +26 -0
  112. openbacktesting/indicators/momentum/uo.py +22 -0
  113. openbacktesting/indicators/momentum/vwmacd.py +20 -0
  114. openbacktesting/indicators/momentum/wavetrend.py +15 -0
  115. openbacktesting/indicators/momentum/willr.py +10 -0
  116. openbacktesting/indicators/overlap/__init__.py +0 -0
  117. openbacktesting/indicators/overlap/alligator.py +13 -0
  118. openbacktesting/indicators/overlap/alma.py +33 -0
  119. openbacktesting/indicators/overlap/anchored_vwap.py +50 -0
  120. openbacktesting/indicators/overlap/anchored_vwap_bands.py +13 -0
  121. openbacktesting/indicators/overlap/avgprice.py +10 -0
  122. openbacktesting/indicators/overlap/dema.py +10 -0
  123. openbacktesting/indicators/overlap/ema.py +12 -0
  124. openbacktesting/indicators/overlap/frama.py +29 -0
  125. openbacktesting/indicators/overlap/fwma.py +10 -0
  126. openbacktesting/indicators/overlap/hilo.py +26 -0
  127. openbacktesting/indicators/overlap/hl2.py +10 -0
  128. openbacktesting/indicators/overlap/hlc3.py +10 -0
  129. openbacktesting/indicators/overlap/hma.py +10 -0
  130. openbacktesting/indicators/overlap/ht_trendline.py +10 -0
  131. openbacktesting/indicators/overlap/hwma.py +10 -0
  132. openbacktesting/indicators/overlap/ichimoku.py +44 -0
  133. openbacktesting/indicators/overlap/jma.py +10 -0
  134. openbacktesting/indicators/overlap/kama.py +10 -0
  135. openbacktesting/indicators/overlap/linreg.py +15 -0
  136. openbacktesting/indicators/overlap/linregangle.py +10 -0
  137. openbacktesting/indicators/overlap/linregintercept.py +10 -0
  138. openbacktesting/indicators/overlap/linregslope.py +10 -0
  139. openbacktesting/indicators/overlap/ma.py +10 -0
  140. openbacktesting/indicators/overlap/ma_envelopes.py +16 -0
  141. openbacktesting/indicators/overlap/mama.py +17 -0
  142. openbacktesting/indicators/overlap/mavp.py +17 -0
  143. openbacktesting/indicators/overlap/mcgd.py +10 -0
  144. openbacktesting/indicators/overlap/medprice.py +10 -0
  145. openbacktesting/indicators/overlap/midpoint.py +10 -0
  146. openbacktesting/indicators/overlap/midprice.py +10 -0
  147. openbacktesting/indicators/overlap/mmar.py +21 -0
  148. openbacktesting/indicators/overlap/ohlc4.py +10 -0
  149. openbacktesting/indicators/overlap/pwma.py +10 -0
  150. openbacktesting/indicators/overlap/rainbow.py +25 -0
  151. openbacktesting/indicators/overlap/rma.py +10 -0
  152. openbacktesting/indicators/overlap/sinwma.py +10 -0
  153. openbacktesting/indicators/overlap/sma.py +14 -0
  154. openbacktesting/indicators/overlap/ssf.py +10 -0
  155. openbacktesting/indicators/overlap/supertrend.py +21 -0
  156. openbacktesting/indicators/overlap/swma.py +10 -0
  157. openbacktesting/indicators/overlap/t3.py +10 -0
  158. openbacktesting/indicators/overlap/tema.py +10 -0
  159. openbacktesting/indicators/overlap/trima.py +10 -0
  160. openbacktesting/indicators/overlap/tsf.py +10 -0
  161. openbacktesting/indicators/overlap/typprice.py +10 -0
  162. openbacktesting/indicators/overlap/vidya.py +10 -0
  163. openbacktesting/indicators/overlap/vwap.py +10 -0
  164. openbacktesting/indicators/overlap/vwma.py +10 -0
  165. openbacktesting/indicators/overlap/wcp.py +10 -0
  166. openbacktesting/indicators/overlap/wma.py +10 -0
  167. openbacktesting/indicators/overlap/zlma.py +10 -0
  168. openbacktesting/indicators/performance/__init__.py +0 -0
  169. openbacktesting/indicators/performance/drawdown.py +18 -0
  170. openbacktesting/indicators/performance/log_return.py +10 -0
  171. openbacktesting/indicators/performance/percent_return.py +10 -0
  172. openbacktesting/indicators/predicates.py +88 -0
  173. openbacktesting/indicators/registry.py +571 -0
  174. openbacktesting/indicators/runtime.py +290 -0
  175. openbacktesting/indicators/statistics/__init__.py +0 -0
  176. openbacktesting/indicators/statistics/beta.py +10 -0
  177. openbacktesting/indicators/statistics/correl.py +10 -0
  178. openbacktesting/indicators/statistics/entropy.py +10 -0
  179. openbacktesting/indicators/statistics/kurtosis.py +10 -0
  180. openbacktesting/indicators/statistics/mad.py +10 -0
  181. openbacktesting/indicators/statistics/md.py +10 -0
  182. openbacktesting/indicators/statistics/median.py +10 -0
  183. openbacktesting/indicators/statistics/mode.py +48 -0
  184. openbacktesting/indicators/statistics/quantile.py +10 -0
  185. openbacktesting/indicators/statistics/skew.py +10 -0
  186. openbacktesting/indicators/statistics/stderr.py +10 -0
  187. openbacktesting/indicators/statistics/stdev.py +10 -0
  188. openbacktesting/indicators/statistics/variance.py +10 -0
  189. openbacktesting/indicators/statistics/zscore.py +10 -0
  190. openbacktesting/indicators/trend/__init__.py +0 -0
  191. openbacktesting/indicators/trend/adx.py +28 -0
  192. openbacktesting/indicators/trend/adxr.py +28 -0
  193. openbacktesting/indicators/trend/amat.py +19 -0
  194. openbacktesting/indicators/trend/aroon.py +18 -0
  195. openbacktesting/indicators/trend/atr_stop.py +33 -0
  196. openbacktesting/indicators/trend/chop.py +20 -0
  197. openbacktesting/indicators/trend/cksp.py +17 -0
  198. openbacktesting/indicators/trend/cpr.py +57 -0
  199. openbacktesting/indicators/trend/decay.py +10 -0
  200. openbacktesting/indicators/trend/decreasing.py +18 -0
  201. openbacktesting/indicators/trend/dpo.py +12 -0
  202. openbacktesting/indicators/trend/dx.py +19 -0
  203. openbacktesting/indicators/trend/edecay.py +10 -0
  204. openbacktesting/indicators/trend/increasing.py +18 -0
  205. openbacktesting/indicators/trend/long_run.py +10 -0
  206. openbacktesting/indicators/trend/minus_dm.py +10 -0
  207. openbacktesting/indicators/trend/pivot_points.py +89 -0
  208. openbacktesting/indicators/trend/pivothigh.py +23 -0
  209. openbacktesting/indicators/trend/pivotlow.py +23 -0
  210. openbacktesting/indicators/trend/plus_dm.py +10 -0
  211. openbacktesting/indicators/trend/pmax.py +18 -0
  212. openbacktesting/indicators/trend/psar.py +19 -0
  213. openbacktesting/indicators/trend/qstick.py +10 -0
  214. openbacktesting/indicators/trend/sarext.py +35 -0
  215. openbacktesting/indicators/trend/short_run.py +10 -0
  216. openbacktesting/indicators/trend/tsignals.py +26 -0
  217. openbacktesting/indicators/trend/ttm_trend.py +16 -0
  218. openbacktesting/indicators/trend/vhf.py +10 -0
  219. openbacktesting/indicators/trend/volatility_stop.py +33 -0
  220. openbacktesting/indicators/trend/vortex.py +17 -0
  221. openbacktesting/indicators/trend/xsignals.py +29 -0
  222. openbacktesting/indicators/types.py +344 -0
  223. openbacktesting/indicators/utility/__init__.py +0 -0
  224. openbacktesting/indicators/utility/barssince.py +21 -0
  225. openbacktesting/indicators/utility/change.py +7 -0
  226. openbacktesting/indicators/utility/cross.py +12 -0
  227. openbacktesting/indicators/utility/crossover.py +11 -0
  228. openbacktesting/indicators/utility/crossunder.py +11 -0
  229. openbacktesting/indicators/utility/cum.py +7 -0
  230. openbacktesting/indicators/utility/falling.py +10 -0
  231. openbacktesting/indicators/utility/highest.py +7 -0
  232. openbacktesting/indicators/utility/highestbars.py +29 -0
  233. openbacktesting/indicators/utility/lowest.py +7 -0
  234. openbacktesting/indicators/utility/lowestbars.py +29 -0
  235. openbacktesting/indicators/utility/percentile_linear_interpolation.py +12 -0
  236. openbacktesting/indicators/utility/percentile_nearest_rank.py +16 -0
  237. openbacktesting/indicators/utility/percentrank.py +7 -0
  238. openbacktesting/indicators/utility/range.py +8 -0
  239. openbacktesting/indicators/utility/rising.py +10 -0
  240. openbacktesting/indicators/utility/rolling_count.py +12 -0
  241. openbacktesting/indicators/utility/rolling_sum.py +7 -0
  242. openbacktesting/indicators/utility/running_max.py +7 -0
  243. openbacktesting/indicators/utility/running_min.py +7 -0
  244. openbacktesting/indicators/utility/shift.py +7 -0
  245. openbacktesting/indicators/utility/valuewhen.py +25 -0
  246. openbacktesting/indicators/volatility/__init__.py +0 -0
  247. openbacktesting/indicators/volatility/aberration.py +21 -0
  248. openbacktesting/indicators/volatility/accbands.py +20 -0
  249. openbacktesting/indicators/volatility/adr.py +7 -0
  250. openbacktesting/indicators/volatility/atr.py +12 -0
  251. openbacktesting/indicators/volatility/avolume.py +10 -0
  252. openbacktesting/indicators/volatility/bbands.py +20 -0
  253. openbacktesting/indicators/volatility/ce.py +25 -0
  254. openbacktesting/indicators/volatility/cvi.py +10 -0
  255. openbacktesting/indicators/volatility/donchian.py +20 -0
  256. openbacktesting/indicators/volatility/hvol.py +10 -0
  257. openbacktesting/indicators/volatility/hwc.py +27 -0
  258. openbacktesting/indicators/volatility/kc.py +27 -0
  259. openbacktesting/indicators/volatility/massi.py +10 -0
  260. openbacktesting/indicators/volatility/natr.py +19 -0
  261. openbacktesting/indicators/volatility/pdist.py +10 -0
  262. openbacktesting/indicators/volatility/rvi.py +21 -0
  263. openbacktesting/indicators/volatility/starc.py +11 -0
  264. openbacktesting/indicators/volatility/thermo.py +28 -0
  265. openbacktesting/indicators/volatility/true_range.py +31 -0
  266. openbacktesting/indicators/volatility/ui.py +10 -0
  267. openbacktesting/indicators/volume/__init__.py +0 -0
  268. openbacktesting/indicators/volume/ad.py +10 -0
  269. openbacktesting/indicators/volume/adosc.py +19 -0
  270. openbacktesting/indicators/volume/aobv.py +31 -0
  271. openbacktesting/indicators/volume/cmf.py +12 -0
  272. openbacktesting/indicators/volume/efi.py +12 -0
  273. openbacktesting/indicators/volume/emv.py +10 -0
  274. openbacktesting/indicators/volume/eom.py +19 -0
  275. openbacktesting/indicators/volume/iii.py +9 -0
  276. openbacktesting/indicators/volume/kvo.py +28 -0
  277. openbacktesting/indicators/volume/marketfi.py +10 -0
  278. openbacktesting/indicators/volume/mfi.py +12 -0
  279. openbacktesting/indicators/volume/nvi.py +26 -0
  280. openbacktesting/indicators/volume/obv.py +10 -0
  281. openbacktesting/indicators/volume/pvi.py +26 -0
  282. openbacktesting/indicators/volume/pvol.py +10 -0
  283. openbacktesting/indicators/volume/pvr.py +10 -0
  284. openbacktesting/indicators/volume/pvt.py +10 -0
  285. openbacktesting/indicators/volume/rvol.py +8 -0
  286. openbacktesting/indicators/volume/vfi.py +18 -0
  287. openbacktesting/indicators/volume/vosc.py +10 -0
  288. openbacktesting/indicators/volume/wad.py +10 -0
  289. openbacktesting/indicators/volume/wvad.py +9 -0
  290. openbacktesting/inputs.py +51 -0
  291. openbacktesting/lib.py +31 -0
  292. openbacktesting/logs.py +129 -0
  293. openbacktesting/optimization.py +8 -0
  294. openbacktesting/optimizer/__init__.py +25 -0
  295. openbacktesting/optimizer/_semantics.py +155 -0
  296. openbacktesting/optimizer/identity.py +45 -0
  297. openbacktesting/optimizer/models.py +92 -0
  298. openbacktesting/optimizer/plan.py +129 -0
  299. openbacktesting/optimizer/portfolio-result.schema.json +4984 -0
  300. openbacktesting/optimizer/query.py +257 -0
  301. openbacktesting/optimizer/runner.py +98 -0
  302. openbacktesting/optimizer/storage.py +261 -0
  303. openbacktesting/optimizer/validation.py +64 -0
  304. openbacktesting/parallel.py +9 -0
  305. openbacktesting/plotting/__init__.py +23 -0
  306. openbacktesting/plotting/collector.py +509 -0
  307. openbacktesting/plotting/encoding.py +102 -0
  308. openbacktesting/plotting/types.py +92 -0
  309. openbacktesting/portfolio/__init__.py +15 -0
  310. openbacktesting/portfolio/analysis.py +245 -0
  311. openbacktesting/portfolio/builder.py +381 -0
  312. openbacktesting/portfolio/catalog.json +1404 -0
  313. openbacktesting/portfolio/helpers.py +92 -0
  314. openbacktesting/portfolio/metrics.py +186 -0
  315. openbacktesting/portfolio/models.py +63 -0
  316. openbacktesting/portfolio/periods.py +164 -0
  317. openbacktesting/portfolio/rates.py +14 -0
  318. openbacktesting/portfolio/snapshot.py +111 -0
  319. openbacktesting/portfolio/stats.py +272 -0
  320. openbacktesting/portfolio/trades.py +136 -0
  321. openbacktesting/portfolio/trading.py +215 -0
  322. openbacktesting/py.typed +0 -0
  323. openbacktesting/runtime.py +330 -0
  324. openbacktesting/simulation/__init__.py +17 -0
  325. openbacktesting/simulation/collection.py +13 -0
  326. openbacktesting/simulation/config.py +241 -0
  327. openbacktesting/simulation/core.py +528 -0
  328. openbacktesting/simulation/optimization.py +326 -0
  329. openbacktesting/simulation/parallel.py +145 -0
  330. openbacktesting/simulation/variants.py +107 -0
  331. openbacktesting/strategy/__init__.py +19 -0
  332. openbacktesting/strategy/bar_state.py +14 -0
  333. openbacktesting/strategy/base.py +810 -0
  334. openbacktesting/strategy/declaration.py +90 -0
  335. openbacktesting/strategy/helpers.py +198 -0
  336. openbacktesting/strategy/inputs.py +460 -0
  337. openbacktesting/strategy/sizing.py +80 -0
  338. openbacktesting/strategy/templates.py +160 -0
  339. openbacktesting/strategy_data.py +10 -0
  340. openbacktesting/test/BTCUSD.csv +157 -0
  341. openbacktesting/test/EURUSD.csv +5001 -0
  342. openbacktesting/test/GOOG.csv +2149 -0
  343. openbacktesting/test/__init__.py +29 -0
  344. openbacktesting/test/__main__.py +11 -0
  345. openbacktesting/test/_test.py +1312 -0
  346. openbacktesting/util.py +31 -0
  347. openbacktesting-0.2.0.dist-info/METADATA +151 -0
  348. openbacktesting-0.2.0.dist-info/RECORD +350 -0
  349. openbacktesting-0.2.0.dist-info/WHEEL +4 -0
  350. openbacktesting-0.2.0.dist-info/licenses/LICENSE +202 -0
@@ -0,0 +1,1404 @@
1
+ {
2
+ "version": 1,
3
+ "entries": [
4
+ {
5
+ "id": "closedFragmentCount",
6
+ "region": "Metrics",
7
+ "path": ["summary", "all", "closedFragmentCount"],
8
+ "unit": "count",
9
+ "methodId": "openbacktesting_portfolio_v1",
10
+ "availability": "supported",
11
+ "example": "advanced/portfolio_report.py",
12
+ "verification": "test_portfolio.py"
13
+ },
14
+ {
15
+ "id": "openLotCount",
16
+ "region": "Metrics",
17
+ "path": ["summary", "all", "openLotCount"],
18
+ "unit": "count",
19
+ "methodId": "openbacktesting_portfolio_v1",
20
+ "availability": "supported",
21
+ "example": "advanced/portfolio_report.py",
22
+ "verification": "test_portfolio.py"
23
+ },
24
+ {
25
+ "id": "closedLotCount",
26
+ "region": "Metrics",
27
+ "path": ["summary", "all", "closedLotCount"],
28
+ "unit": "count",
29
+ "methodId": "openbacktesting_portfolio_v1",
30
+ "availability": "supported",
31
+ "example": "advanced/portfolio_report.py",
32
+ "verification": "test_portfolio.py"
33
+ },
34
+ {
35
+ "id": "openedLotCount",
36
+ "region": "Metrics",
37
+ "path": ["summary", "all", "openedLotCount"],
38
+ "unit": "count",
39
+ "methodId": "openbacktesting_portfolio_v1",
40
+ "availability": "supported",
41
+ "example": "advanced/portfolio_report.py",
42
+ "verification": "test_portfolio.py"
43
+ },
44
+ {
45
+ "id": "winningCount",
46
+ "region": "Metrics",
47
+ "path": ["summary", "all", "winningCount"],
48
+ "unit": "count",
49
+ "methodId": "openbacktesting_portfolio_v1",
50
+ "availability": "supported",
51
+ "example": "advanced/portfolio_report.py",
52
+ "verification": "test_portfolio.py"
53
+ },
54
+ {
55
+ "id": "losingCount",
56
+ "region": "Metrics",
57
+ "path": ["summary", "all", "losingCount"],
58
+ "unit": "count",
59
+ "methodId": "openbacktesting_portfolio_v1",
60
+ "availability": "supported",
61
+ "example": "advanced/portfolio_report.py",
62
+ "verification": "test_portfolio.py"
63
+ },
64
+ {
65
+ "id": "evenCount",
66
+ "region": "Metrics",
67
+ "path": ["summary", "all", "evenCount"],
68
+ "unit": "count",
69
+ "methodId": "openbacktesting_portfolio_v1",
70
+ "availability": "supported",
71
+ "example": "advanced/portfolio_report.py",
72
+ "verification": "test_portfolio.py"
73
+ },
74
+ {
75
+ "id": "closedNetPnl",
76
+ "region": "Metrics",
77
+ "path": ["summary", "all", "closedNetPnl"],
78
+ "unit": "money",
79
+ "methodId": "openbacktesting_portfolio_v1",
80
+ "availability": "supported",
81
+ "example": "advanced/portfolio_report.py",
82
+ "verification": "test_portfolio.py"
83
+ },
84
+ {
85
+ "id": "grossProfit",
86
+ "region": "Metrics",
87
+ "path": ["summary", "all", "grossProfit"],
88
+ "unit": "money",
89
+ "methodId": "openbacktesting_portfolio_v1",
90
+ "availability": "supported",
91
+ "example": "advanced/portfolio_report.py",
92
+ "verification": "test_portfolio.py"
93
+ },
94
+ {
95
+ "id": "grossLoss",
96
+ "region": "Metrics",
97
+ "path": ["summary", "all", "grossLoss"],
98
+ "unit": "money",
99
+ "methodId": "openbacktesting_portfolio_v1",
100
+ "availability": "supported",
101
+ "example": "advanced/portfolio_report.py",
102
+ "verification": "test_portfolio.py"
103
+ },
104
+ {
105
+ "id": "expectedPayoff",
106
+ "region": "Metrics",
107
+ "path": ["summary", "all", "expectedPayoff"],
108
+ "unit": "money",
109
+ "methodId": "openbacktesting_portfolio_v1",
110
+ "availability": "supported",
111
+ "example": "advanced/portfolio_report.py",
112
+ "verification": "test_portfolio.py"
113
+ },
114
+ {
115
+ "id": "averageProfit",
116
+ "region": "Metrics",
117
+ "path": ["summary", "all", "averageProfit"],
118
+ "unit": "money",
119
+ "methodId": "openbacktesting_portfolio_v1",
120
+ "availability": "supported",
121
+ "example": "advanced/portfolio_report.py",
122
+ "verification": "test_portfolio.py"
123
+ },
124
+ {
125
+ "id": "averageLoss",
126
+ "region": "Metrics",
127
+ "path": ["summary", "all", "averageLoss"],
128
+ "unit": "money",
129
+ "methodId": "openbacktesting_portfolio_v1",
130
+ "availability": "supported",
131
+ "example": "advanced/portfolio_report.py",
132
+ "verification": "test_portfolio.py"
133
+ },
134
+ {
135
+ "id": "closedFees",
136
+ "region": "Metrics",
137
+ "path": ["summary", "all", "closedFees"],
138
+ "unit": "money",
139
+ "methodId": "openbacktesting_portfolio_v1",
140
+ "availability": "supported",
141
+ "example": "advanced/portfolio_report.py",
142
+ "verification": "test_portfolio.py"
143
+ },
144
+ {
145
+ "id": "profitFactorMoney",
146
+ "region": "Metrics",
147
+ "path": ["summary", "all", "profitFactorMoney"],
148
+ "unit": "ratio",
149
+ "methodId": "openbacktesting_portfolio_v1",
150
+ "availability": "supported",
151
+ "example": "advanced/portfolio_report.py",
152
+ "verification": "test_portfolio.py"
153
+ },
154
+ {
155
+ "id": "winRate",
156
+ "region": "Metrics",
157
+ "path": ["summary", "all", "winRate"],
158
+ "unit": "ratio",
159
+ "methodId": "openbacktesting_portfolio_v1",
160
+ "availability": "supported",
161
+ "example": "advanced/portfolio_report.py",
162
+ "verification": "test_portfolio.py"
163
+ },
164
+ {
165
+ "id": "meanTradeReturn",
166
+ "region": "Metrics",
167
+ "path": ["summary", "all", "meanTradeReturn"],
168
+ "unit": "ratio",
169
+ "methodId": "openbacktesting_portfolio_v1",
170
+ "availability": "supported",
171
+ "example": "advanced/portfolio_report.py",
172
+ "verification": "test_portfolio.py"
173
+ },
174
+ {
175
+ "id": "averageTradeBars",
176
+ "region": "Metrics",
177
+ "path": ["summary", "all", "averageTradeBars"],
178
+ "unit": "bars",
179
+ "methodId": "openbacktesting_portfolio_v1",
180
+ "availability": "supported",
181
+ "example": "advanced/portfolio_report.py",
182
+ "verification": "test_portfolio.py"
183
+ },
184
+ {
185
+ "id": "averageWinningBars",
186
+ "region": "Metrics",
187
+ "path": ["summary", "all", "averageWinningBars"],
188
+ "unit": "bars",
189
+ "methodId": "openbacktesting_portfolio_v1",
190
+ "availability": "supported",
191
+ "example": "advanced/portfolio_report.py",
192
+ "verification": "test_portfolio.py"
193
+ },
194
+ {
195
+ "id": "averageLosingBars",
196
+ "region": "Metrics",
197
+ "path": ["summary", "all", "averageLosingBars"],
198
+ "unit": "bars",
199
+ "methodId": "openbacktesting_portfolio_v1",
200
+ "availability": "supported",
201
+ "example": "advanced/portfolio_report.py",
202
+ "verification": "test_portfolio.py"
203
+ },
204
+ {
205
+ "id": "averageProfitReturn",
206
+ "region": "Metrics",
207
+ "path": ["summary", "all", "averageProfitReturn"],
208
+ "unit": "ratio",
209
+ "methodId": "openbacktesting_portfolio_v1",
210
+ "availability": "supported",
211
+ "example": "advanced/portfolio_report.py",
212
+ "verification": "test_portfolio.py"
213
+ },
214
+ {
215
+ "id": "largestProfit",
216
+ "region": "Metrics",
217
+ "path": ["summary", "all", "largestProfit"],
218
+ "unit": "money",
219
+ "methodId": "openbacktesting_portfolio_v1",
220
+ "availability": "supported",
221
+ "example": "advanced/portfolio_report.py",
222
+ "verification": "test_portfolio.py"
223
+ },
224
+ {
225
+ "id": "largestProfitReturn",
226
+ "region": "Metrics",
227
+ "path": ["summary", "all", "largestProfitReturn"],
228
+ "unit": "ratio",
229
+ "methodId": "openbacktesting_portfolio_v1",
230
+ "availability": "supported",
231
+ "example": "advanced/portfolio_report.py",
232
+ "verification": "test_portfolio.py"
233
+ },
234
+ {
235
+ "id": "largestProfitShare",
236
+ "region": "Metrics",
237
+ "path": ["summary", "all", "largestProfitShare"],
238
+ "unit": "ratio",
239
+ "methodId": "openbacktesting_portfolio_v1",
240
+ "availability": "supported",
241
+ "example": "advanced/portfolio_report.py",
242
+ "verification": "test_portfolio.py"
243
+ },
244
+ {
245
+ "id": "averageLossReturn",
246
+ "region": "Metrics",
247
+ "path": ["summary", "all", "averageLossReturn"],
248
+ "unit": "ratio",
249
+ "methodId": "openbacktesting_portfolio_v1",
250
+ "availability": "supported",
251
+ "example": "advanced/portfolio_report.py",
252
+ "verification": "test_portfolio.py"
253
+ },
254
+ {
255
+ "id": "largestLoss",
256
+ "region": "Metrics",
257
+ "path": ["summary", "all", "largestLoss"],
258
+ "unit": "money",
259
+ "methodId": "openbacktesting_portfolio_v1",
260
+ "availability": "supported",
261
+ "example": "advanced/portfolio_report.py",
262
+ "verification": "test_portfolio.py"
263
+ },
264
+ {
265
+ "id": "largestLossReturn",
266
+ "region": "Metrics",
267
+ "path": ["summary", "all", "largestLossReturn"],
268
+ "unit": "ratio",
269
+ "methodId": "openbacktesting_portfolio_v1",
270
+ "availability": "supported",
271
+ "example": "advanced/portfolio_report.py",
272
+ "verification": "test_portfolio.py"
273
+ },
274
+ {
275
+ "id": "largestLossShare",
276
+ "region": "Metrics",
277
+ "path": ["summary", "all", "largestLossShare"],
278
+ "unit": "ratio",
279
+ "methodId": "openbacktesting_portfolio_v1",
280
+ "availability": "supported",
281
+ "example": "advanced/portfolio_report.py",
282
+ "verification": "test_portfolio.py"
283
+ },
284
+ {
285
+ "id": "averageProfitLossRatio",
286
+ "region": "Metrics",
287
+ "path": ["summary", "all", "averageProfitLossRatio"],
288
+ "unit": "ratio",
289
+ "methodId": "openbacktesting_portfolio_v1",
290
+ "availability": "supported",
291
+ "example": "advanced/portfolio_report.py",
292
+ "verification": "test_portfolio.py"
293
+ },
294
+ {
295
+ "id": "maxTradeDurationNs",
296
+ "region": "Metrics",
297
+ "path": ["summary", "all", "maxTradeDurationNs"],
298
+ "unit": "nanoseconds",
299
+ "methodId": "openbacktesting_portfolio_v1",
300
+ "availability": "supported",
301
+ "example": "advanced/portfolio_report.py",
302
+ "verification": "test_portfolio.py"
303
+ },
304
+ {
305
+ "id": "averageTradeDurationNs",
306
+ "region": "Metrics",
307
+ "path": ["summary", "all", "averageTradeDurationNs"],
308
+ "unit": "nanoseconds",
309
+ "methodId": "openbacktesting_portfolio_v1",
310
+ "availability": "supported",
311
+ "example": "advanced/portfolio_report.py",
312
+ "verification": "test_portfolio.py"
313
+ },
314
+ {
315
+ "id": "maxDrawdown",
316
+ "region": "Metrics",
317
+ "path": ["summary", "all", "maxDrawdown"],
318
+ "unit": "money",
319
+ "methodId": "close_path_v1",
320
+ "availability": "supported",
321
+ "example": "advanced/portfolio_report.py",
322
+ "verification": "test_portfolio.py"
323
+ },
324
+ {
325
+ "id": "maxRunup",
326
+ "region": "Metrics",
327
+ "path": ["summary", "all", "maxRunup"],
328
+ "unit": "money",
329
+ "methodId": "close_path_v1",
330
+ "availability": "supported",
331
+ "example": "advanced/portfolio_report.py",
332
+ "verification": "test_portfolio.py"
333
+ },
334
+ {
335
+ "id": "maxDrawdownFraction",
336
+ "region": "Metrics",
337
+ "path": ["summary", "all", "maxDrawdownFraction"],
338
+ "unit": "ratio",
339
+ "methodId": "close_path_v1",
340
+ "availability": "supported",
341
+ "example": "advanced/portfolio_report.py",
342
+ "verification": "test_portfolio.py"
343
+ },
344
+ {
345
+ "id": "maxRunupFraction",
346
+ "region": "Metrics",
347
+ "path": ["summary", "all", "maxRunupFraction"],
348
+ "unit": "ratio",
349
+ "methodId": "close_path_v1",
350
+ "availability": "supported",
351
+ "example": "advanced/portfolio_report.py",
352
+ "verification": "test_portfolio.py"
353
+ },
354
+ {
355
+ "id": "maxDrawdownInitialFraction",
356
+ "region": "Metrics",
357
+ "path": ["summary", "all", "maxDrawdownInitialFraction"],
358
+ "unit": "ratio",
359
+ "methodId": "close_path_v1",
360
+ "availability": "supported",
361
+ "example": "advanced/portfolio_report.py",
362
+ "verification": "test_portfolio.py"
363
+ },
364
+ {
365
+ "id": "maxRunupInitialFraction",
366
+ "region": "Metrics",
367
+ "path": ["summary", "all", "maxRunupInitialFraction"],
368
+ "unit": "ratio",
369
+ "methodId": "close_path_v1",
370
+ "availability": "supported",
371
+ "example": "advanced/portfolio_report.py",
372
+ "verification": "test_portfolio.py"
373
+ },
374
+ {
375
+ "id": "initialCapital",
376
+ "region": "Metrics",
377
+ "path": ["summary", "all", "initialCapital"],
378
+ "unit": "money",
379
+ "methodId": "openbacktesting_portfolio_v1",
380
+ "availability": "supported",
381
+ "example": "advanced/portfolio_report.py",
382
+ "verification": "test_portfolio.py"
383
+ },
384
+ {
385
+ "id": "equityFinal",
386
+ "region": "Metrics",
387
+ "path": ["summary", "all", "equityFinal"],
388
+ "unit": "money",
389
+ "methodId": "openbacktesting_portfolio_v1",
390
+ "availability": "supported",
391
+ "example": "advanced/portfolio_report.py",
392
+ "verification": "test_portfolio.py"
393
+ },
394
+ {
395
+ "id": "equityPeak",
396
+ "region": "Metrics",
397
+ "path": ["summary", "all", "equityPeak"],
398
+ "unit": "money",
399
+ "methodId": "openbacktesting_portfolio_v1",
400
+ "availability": "supported",
401
+ "example": "advanced/portfolio_report.py",
402
+ "verification": "test_portfolio.py"
403
+ },
404
+ {
405
+ "id": "totalPnl",
406
+ "region": "Metrics",
407
+ "path": ["summary", "all", "totalPnl"],
408
+ "unit": "money",
409
+ "methodId": "openbacktesting_portfolio_v1",
410
+ "availability": "supported",
411
+ "example": "advanced/portfolio_report.py",
412
+ "verification": "test_portfolio.py"
413
+ },
414
+ {
415
+ "id": "totalReturn",
416
+ "region": "Metrics",
417
+ "path": ["summary", "all", "totalReturn"],
418
+ "unit": "ratio",
419
+ "methodId": "openbacktesting_portfolio_v1",
420
+ "availability": "supported",
421
+ "example": "advanced/portfolio_report.py",
422
+ "verification": "test_portfolio.py"
423
+ },
424
+ {
425
+ "id": "openPnlGross",
426
+ "region": "Metrics",
427
+ "path": ["summary", "all", "openPnlGross"],
428
+ "unit": "money",
429
+ "methodId": "openbacktesting_portfolio_v1",
430
+ "availability": "supported",
431
+ "example": "advanced/portfolio_report.py",
432
+ "verification": "test_portfolio.py"
433
+ },
434
+ {
435
+ "id": "openPnlNet",
436
+ "region": "Metrics",
437
+ "path": ["summary", "all", "openPnlNet"],
438
+ "unit": "money",
439
+ "methodId": "openbacktesting_portfolio_v1",
440
+ "availability": "supported",
441
+ "example": "advanced/portfolio_report.py",
442
+ "verification": "test_portfolio.py"
443
+ },
444
+ {
445
+ "id": "remainingEntryFees",
446
+ "region": "Metrics",
447
+ "path": ["summary", "all", "remainingEntryFees"],
448
+ "unit": "money",
449
+ "methodId": "openbacktesting_portfolio_v1",
450
+ "availability": "supported",
451
+ "example": "advanced/portfolio_report.py",
452
+ "verification": "test_portfolio.py"
453
+ },
454
+ {
455
+ "id": "balance",
456
+ "region": "Metrics",
457
+ "path": ["summary", "all", "balance"],
458
+ "unit": "money",
459
+ "methodId": "openbacktesting_portfolio_v1",
460
+ "availability": "supported",
461
+ "example": "advanced/portfolio_report.py",
462
+ "verification": "test_portfolio.py"
463
+ },
464
+ {
465
+ "id": "feesPaid",
466
+ "region": "Metrics",
467
+ "path": ["summary", "all", "feesPaid"],
468
+ "unit": "money",
469
+ "methodId": "openbacktesting_portfolio_v1",
470
+ "availability": "supported",
471
+ "example": "advanced/portfolio_report.py",
472
+ "verification": "test_portfolio.py"
473
+ },
474
+ {
475
+ "id": "commissionLoad",
476
+ "region": "Metrics",
477
+ "path": ["summary", "all", "commissionLoad"],
478
+ "unit": "ratio",
479
+ "methodId": "commission_load_gross_activity_v1",
480
+ "availability": "supported",
481
+ "example": "advanced/portfolio_report.py",
482
+ "verification": "test_portfolio.py",
483
+ "definition": {
484
+ "numerator": "feesPaid",
485
+ "denominator": "sum(abs(fill.qty * fill.price))",
486
+ "scope": "all_fills"
487
+ }
488
+ },
489
+ {
490
+ "id": "averageMarginUsed",
491
+ "region": "Metrics",
492
+ "path": ["summary", "all", "averageMarginUsed"],
493
+ "unit": "money",
494
+ "methodId": "bar_close_mean_v1",
495
+ "availability": "supported",
496
+ "example": "advanced/portfolio_report.py",
497
+ "verification": "test_portfolio.py"
498
+ },
499
+ {
500
+ "id": "maxMarginUsed",
501
+ "region": "Metrics",
502
+ "path": ["summary", "all", "maxMarginUsed"],
503
+ "unit": "money",
504
+ "methodId": "execution_samples_v1",
505
+ "availability": "supported",
506
+ "example": "advanced/portfolio_report.py",
507
+ "verification": "test_portfolio.py"
508
+ },
509
+ {
510
+ "id": "maxGrossQuantity",
511
+ "region": "Metrics",
512
+ "path": ["summary", "all", "maxGrossQuantity"],
513
+ "unit": "quantity",
514
+ "methodId": "execution_samples_v1",
515
+ "availability": "supported",
516
+ "example": "advanced/portfolio_report.py",
517
+ "verification": "test_portfolio.py"
518
+ },
519
+ {
520
+ "id": "maxLongQuantity",
521
+ "region": "Metrics",
522
+ "path": ["summary", "all", "maxLongQuantity"],
523
+ "unit": "quantity",
524
+ "methodId": "execution_samples_v1",
525
+ "availability": "supported",
526
+ "example": "advanced/portfolio_report.py",
527
+ "verification": "test_portfolio.py"
528
+ },
529
+ {
530
+ "id": "maxShortQuantity",
531
+ "region": "Metrics",
532
+ "path": ["summary", "all", "maxShortQuantity"],
533
+ "unit": "quantity",
534
+ "methodId": "execution_samples_v1",
535
+ "availability": "supported",
536
+ "example": "advanced/portfolio_report.py",
537
+ "verification": "test_portfolio.py"
538
+ },
539
+ {
540
+ "id": "maxNetQuantity",
541
+ "region": "Metrics",
542
+ "path": ["summary", "all", "maxNetQuantity"],
543
+ "unit": "quantity",
544
+ "methodId": "execution_samples_v1",
545
+ "availability": "supported",
546
+ "example": "advanced/portfolio_report.py",
547
+ "verification": "test_portfolio.py"
548
+ },
549
+ {
550
+ "id": "intrabar.maxDrawdown",
551
+ "region": "Metrics",
552
+ "path": ["summary", "all", "intrabar.maxDrawdown"],
553
+ "unit": "money",
554
+ "methodId": "sampled_bounds_v1",
555
+ "availability": "supported",
556
+ "example": "advanced/portfolio_report.py",
557
+ "verification": "test_portfolio.py"
558
+ },
559
+ {
560
+ "id": "intrabar.maxRunup",
561
+ "region": "Metrics",
562
+ "path": ["summary", "all", "intrabar.maxRunup"],
563
+ "unit": "money",
564
+ "methodId": "sampled_bounds_v1",
565
+ "availability": "supported",
566
+ "example": "advanced/portfolio_report.py",
567
+ "verification": "test_portfolio.py"
568
+ },
569
+ {
570
+ "id": "intrabar.maxDrawdownFraction",
571
+ "region": "Metrics",
572
+ "path": ["summary", "all", "intrabar.maxDrawdownFraction"],
573
+ "unit": "ratio",
574
+ "methodId": "sampled_bounds_v1",
575
+ "availability": "supported",
576
+ "example": "advanced/portfolio_report.py",
577
+ "verification": "test_portfolio.py"
578
+ },
579
+ {
580
+ "id": "intrabar.maxRunupFraction",
581
+ "region": "Metrics",
582
+ "path": ["summary", "all", "intrabar.maxRunupFraction"],
583
+ "unit": "ratio",
584
+ "methodId": "sampled_bounds_v1",
585
+ "availability": "supported",
586
+ "example": "advanced/portfolio_report.py",
587
+ "verification": "test_portfolio.py"
588
+ },
589
+ {
590
+ "id": "intrabar.maxDrawdownInitialFraction",
591
+ "region": "Metrics",
592
+ "path": ["summary", "all", "intrabar.maxDrawdownInitialFraction"],
593
+ "unit": "ratio",
594
+ "methodId": "sampled_bounds_v1",
595
+ "availability": "supported",
596
+ "example": "advanced/portfolio_report.py",
597
+ "verification": "test_portfolio.py"
598
+ },
599
+ {
600
+ "id": "intrabar.maxRunupInitialFraction",
601
+ "region": "Metrics",
602
+ "path": ["summary", "all", "intrabar.maxRunupInitialFraction"],
603
+ "unit": "ratio",
604
+ "methodId": "sampled_bounds_v1",
605
+ "availability": "supported",
606
+ "example": "advanced/portfolio_report.py",
607
+ "verification": "test_portfolio.py"
608
+ },
609
+ {
610
+ "id": "observedCapitalRequired",
611
+ "region": "Metrics",
612
+ "path": ["summary", "all", "observedCapitalRequired"],
613
+ "unit": "money",
614
+ "methodId": "observed_capital_requirement_v1",
615
+ "availability": "supported",
616
+ "example": "advanced/portfolio_report.py",
617
+ "verification": "test_portfolio.py"
618
+ },
619
+ {
620
+ "id": "returnOnInitialCapital",
621
+ "region": "Metrics",
622
+ "path": ["summary", "all", "returnOnInitialCapital"],
623
+ "unit": "ratio",
624
+ "methodId": "observed_capital_efficiency_v1",
625
+ "availability": "supported",
626
+ "example": "advanced/portfolio_report.py",
627
+ "verification": "test_portfolio.py",
628
+ "definition": {
629
+ "numerator": "closedNetPnl",
630
+ "denominator": "initialCapital",
631
+ "scope": "executed_range"
632
+ }
633
+ },
634
+ {
635
+ "id": "returnOnMaxDrawdown",
636
+ "region": "Metrics",
637
+ "path": ["summary", "all", "returnOnMaxDrawdown"],
638
+ "unit": "ratio",
639
+ "methodId": "observed_capital_efficiency_v1",
640
+ "availability": "supported",
641
+ "example": "advanced/portfolio_report.py",
642
+ "verification": "test_portfolio.py",
643
+ "definition": {
644
+ "numerator": "closedNetPnl",
645
+ "denominator": "intrabar.maxDrawdown",
646
+ "scope": "ordered_samples_and_unordered_bar_bounds"
647
+ }
648
+ },
649
+ {
650
+ "id": "netPnlToLargestLoss",
651
+ "region": "Metrics",
652
+ "path": ["summary", "all", "netPnlToLargestLoss"],
653
+ "unit": "ratio",
654
+ "methodId": "observed_capital_efficiency_v1",
655
+ "availability": "supported",
656
+ "example": "advanced/portfolio_report.py",
657
+ "verification": "test_portfolio.py",
658
+ "definition": {
659
+ "numerator": "closedNetPnl",
660
+ "denominator": "largestLoss",
661
+ "scope": "closed_fragments"
662
+ }
663
+ },
664
+ {
665
+ "id": "marginEfficiency",
666
+ "region": "Metrics",
667
+ "path": ["summary", "all", "marginEfficiency"],
668
+ "unit": "ratio",
669
+ "methodId": "observed_capital_efficiency_v1",
670
+ "availability": "supported",
671
+ "example": "advanced/portfolio_report.py",
672
+ "verification": "test_portfolio.py",
673
+ "definition": {
674
+ "numerator": "closedNetPnl",
675
+ "denominator": "averageMarginUsed",
676
+ "scope": "bar_close_mean"
677
+ }
678
+ },
679
+ {
680
+ "id": "returnOnObservedCapital",
681
+ "region": "Metrics",
682
+ "path": ["summary", "all", "returnOnObservedCapital"],
683
+ "unit": "ratio",
684
+ "methodId": "observed_capital_efficiency_v1",
685
+ "availability": "supported",
686
+ "example": "advanced/portfolio_report.py",
687
+ "verification": "test_portfolio.py",
688
+ "definition": {
689
+ "numerator": "closedNetPnl",
690
+ "denominator": "observedCapitalRequired",
691
+ "scope": "execution_samples"
692
+ }
693
+ },
694
+ {
695
+ "id": "marginCalls",
696
+ "region": "Metrics",
697
+ "path": ["summary", "all", "marginCalls"],
698
+ "unit": "count",
699
+ "methodId": "openbacktesting_portfolio_v1",
700
+ "availability": "unsupported",
701
+ "example": "advanced/portfolio_report.py",
702
+ "verification": "test_portfolio.py"
703
+ },
704
+ {
705
+ "id": "totalMarginLiquidatedVolume",
706
+ "region": "Metrics",
707
+ "path": ["summary", "all", "totalMarginLiquidatedVolume"],
708
+ "unit": "money",
709
+ "methodId": "openbacktesting_portfolio_v1",
710
+ "availability": "unsupported",
711
+ "example": "advanced/portfolio_report.py",
712
+ "verification": "test_portfolio.py"
713
+ },
714
+ {
715
+ "id": "largestMarginLiquidatedVolume",
716
+ "region": "Metrics",
717
+ "path": ["summary", "all", "largestMarginLiquidatedVolume"],
718
+ "unit": "money",
719
+ "methodId": "openbacktesting_portfolio_v1",
720
+ "availability": "unsupported",
721
+ "example": "advanced/portfolio_report.py",
722
+ "verification": "test_portfolio.py"
723
+ },
724
+ {
725
+ "id": "tvAccountSizeRequired",
726
+ "region": "Metrics",
727
+ "path": ["summary", "all", "tvAccountSizeRequired"],
728
+ "unit": "money",
729
+ "methodId": "openbacktesting_portfolio_v1",
730
+ "availability": "unsupported",
731
+ "example": "advanced/portfolio_report.py",
732
+ "verification": "test_portfolio.py"
733
+ },
734
+ {
735
+ "id": "tvReturnOnAccountSize",
736
+ "region": "Metrics",
737
+ "path": ["summary", "all", "tvReturnOnAccountSize"],
738
+ "unit": "money",
739
+ "methodId": "openbacktesting_portfolio_v1",
740
+ "availability": "unsupported",
741
+ "example": "advanced/portfolio_report.py",
742
+ "verification": "test_portfolio.py"
743
+ },
744
+ {
745
+ "id": "currencyConversion",
746
+ "region": "Metrics",
747
+ "path": ["summary", "all", "currencyConversion"],
748
+ "unit": "money",
749
+ "methodId": "openbacktesting_portfolio_v1",
750
+ "availability": "unsupported",
751
+ "example": "advanced/portfolio_report.py",
752
+ "verification": "test_portfolio.py"
753
+ },
754
+ {
755
+ "id": "contractMultiplier",
756
+ "region": "Metrics",
757
+ "path": ["summary", "all", "contractMultiplier"],
758
+ "unit": "money",
759
+ "methodId": "openbacktesting_portfolio_v1",
760
+ "availability": "unsupported",
761
+ "example": "advanced/portfolio_report.py",
762
+ "verification": "test_portfolio.py"
763
+ },
764
+ {
765
+ "id": "sharpe",
766
+ "region": "Metrics",
767
+ "path": ["summary", "all", "sharpe"],
768
+ "unit": "ratio",
769
+ "methodId": "monthly_compounded_rf_v1",
770
+ "availability": "supported",
771
+ "example": "advanced/portfolio_report.py",
772
+ "verification": "test_portfolio.py"
773
+ },
774
+ {
775
+ "id": "sortino",
776
+ "region": "Metrics",
777
+ "path": ["summary", "all", "sortino"],
778
+ "unit": "ratio",
779
+ "methodId": "monthly_compounded_rf_v1",
780
+ "availability": "supported",
781
+ "example": "advanced/portfolio_report.py",
782
+ "verification": "test_portfolio.py"
783
+ },
784
+ {
785
+ "id": "cagr",
786
+ "region": "Metrics",
787
+ "path": ["summary", "all", "cagr"],
788
+ "unit": "ratio",
789
+ "methodId": "openbacktesting_portfolio_v1",
790
+ "availability": "supported",
791
+ "example": "advanced/portfolio_report.py",
792
+ "verification": "test_portfolio.py"
793
+ },
794
+ {
795
+ "id": "buyHoldReturn",
796
+ "region": "Metrics",
797
+ "path": ["summary", "all", "buyHoldReturn"],
798
+ "unit": "ratio",
799
+ "methodId": "openbacktesting_portfolio_v1",
800
+ "availability": "supported",
801
+ "example": "advanced/portfolio_report.py",
802
+ "verification": "test_portfolio.py"
803
+ },
804
+ {
805
+ "id": "outperformance",
806
+ "region": "Metrics",
807
+ "path": ["summary", "all", "outperformance"],
808
+ "unit": "ratio",
809
+ "methodId": "openbacktesting_portfolio_v1",
810
+ "availability": "supported",
811
+ "example": "advanced/portfolio_report.py",
812
+ "verification": "test_portfolio.py"
813
+ },
814
+ {
815
+ "id": "correlation",
816
+ "region": "Metrics",
817
+ "path": ["summary", "all", "correlation"],
818
+ "unit": "ratio",
819
+ "methodId": "paired_period_returns_v1",
820
+ "availability": "supported",
821
+ "example": "advanced/portfolio_report.py",
822
+ "verification": "test_portfolio.py"
823
+ },
824
+ {
825
+ "id": "Performance:series.account",
826
+ "region": "Performance",
827
+ "path": ["series", "account"],
828
+ "unit": "dataset",
829
+ "methodId": "openbacktesting_portfolio_v1",
830
+ "availability": "supported",
831
+ "example": "advanced/portfolio_report.py",
832
+ "verification": "test_portfolio.py"
833
+ },
834
+ {
835
+ "id": "Performance:series.closedCumulative",
836
+ "region": "Performance",
837
+ "path": ["series", "closedCumulative"],
838
+ "unit": "dataset",
839
+ "methodId": "openbacktesting_portfolio_v1",
840
+ "availability": "supported",
841
+ "example": "advanced/portfolio_report.py",
842
+ "verification": "test_portfolio.py"
843
+ },
844
+ {
845
+ "id": "Performance:series.benchmark",
846
+ "region": "Performance",
847
+ "path": ["series", "benchmark"],
848
+ "unit": "dataset",
849
+ "methodId": "openbacktesting_portfolio_v1",
850
+ "availability": "supported",
851
+ "example": "advanced/portfolio_report.py",
852
+ "verification": "test_portfolio.py"
853
+ },
854
+ {
855
+ "id": "Breakdown:analysis.breakdown",
856
+ "region": "Breakdown",
857
+ "path": ["analysis", "breakdown"],
858
+ "unit": "dataset",
859
+ "methodId": "openbacktesting_portfolio_v1",
860
+ "availability": "supported",
861
+ "example": "advanced/portfolio_report.py",
862
+ "verification": "test_portfolio.py"
863
+ },
864
+ {
865
+ "id": "Periodical:analysis.periodical",
866
+ "region": "Periodical",
867
+ "path": ["analysis", "periodical"],
868
+ "unit": "dataset",
869
+ "methodId": "openbacktesting_portfolio_v1",
870
+ "availability": "supported",
871
+ "example": "advanced/portfolio_report.py",
872
+ "verification": "test_portfolio.py"
873
+ },
874
+ {
875
+ "id": "Benchmarking:series.benchmark",
876
+ "region": "Benchmarking",
877
+ "path": ["series", "benchmark"],
878
+ "unit": "dataset",
879
+ "methodId": "openbacktesting_portfolio_v1",
880
+ "availability": "supported",
881
+ "example": "advanced/portfolio_report.py",
882
+ "verification": "test_portfolio.py"
883
+ },
884
+ {
885
+ "id": "Margin usage:series.margin",
886
+ "region": "Margin usage",
887
+ "path": ["series", "margin"],
888
+ "unit": "dataset",
889
+ "methodId": "openbacktesting_portfolio_v1",
890
+ "availability": "supported",
891
+ "example": "advanced/portfolio_report.py",
892
+ "verification": "test_portfolio.py"
893
+ },
894
+ {
895
+ "id": "Growth and decline:analysis.growthAndDecline",
896
+ "region": "Growth and decline",
897
+ "path": ["analysis", "growthAndDecline"],
898
+ "unit": "dataset",
899
+ "methodId": "openbacktesting_portfolio_v1",
900
+ "availability": "supported",
901
+ "example": "advanced/portfolio_report.py",
902
+ "verification": "test_portfolio.py"
903
+ },
904
+ {
905
+ "id": "Distribution:analysis.distribution",
906
+ "region": "Distribution",
907
+ "path": ["analysis", "distribution"],
908
+ "unit": "dataset",
909
+ "methodId": "openbacktesting_portfolio_v1",
910
+ "availability": "supported",
911
+ "example": "advanced/portfolio_report.py",
912
+ "verification": "test_portfolio.py"
913
+ },
914
+ {
915
+ "id": "Streaks:analysis.streaks",
916
+ "region": "Streaks",
917
+ "path": ["analysis", "streaks"],
918
+ "unit": "dataset",
919
+ "methodId": "openbacktesting_portfolio_v1",
920
+ "availability": "supported",
921
+ "example": "advanced/portfolio_report.py",
922
+ "verification": "test_portfolio.py"
923
+ },
924
+ {
925
+ "id": "Time patterns:analysis.timePatterns",
926
+ "region": "Time patterns",
927
+ "path": ["analysis", "timePatterns"],
928
+ "unit": "dataset",
929
+ "methodId": "openbacktesting_portfolio_v1",
930
+ "availability": "supported",
931
+ "example": "advanced/portfolio_report.py",
932
+ "verification": "test_portfolio.py"
933
+ },
934
+ {
935
+ "id": "List of Trades:trades.closedFragments",
936
+ "region": "List of Trades",
937
+ "path": ["trades", "closedFragments"],
938
+ "unit": "dataset",
939
+ "methodId": "openbacktesting_portfolio_v1",
940
+ "availability": "supported",
941
+ "example": "advanced/portfolio_report.py",
942
+ "verification": "test_portfolio.py"
943
+ },
944
+ {
945
+ "id": "List of Trades:trades.openLots",
946
+ "region": "List of Trades",
947
+ "path": ["trades", "openLots"],
948
+ "unit": "dataset",
949
+ "methodId": "openbacktesting_portfolio_v1",
950
+ "availability": "supported",
951
+ "example": "advanced/portfolio_report.py",
952
+ "verification": "test_portfolio.py"
953
+ },
954
+ {
955
+ "id": "legacy:Start",
956
+ "region": "Native",
957
+ "path": ["extensions", "legacy", "Start"],
958
+ "unit": "native",
959
+ "methodId": "engine_legacy_v1",
960
+ "availability": "supported",
961
+ "example": "advanced/portfolio_report.py",
962
+ "verification": "test_portfolio.py"
963
+ },
964
+ {
965
+ "id": "legacy:End",
966
+ "region": "Native",
967
+ "path": ["extensions", "legacy", "End"],
968
+ "unit": "native",
969
+ "methodId": "engine_legacy_v1",
970
+ "availability": "supported",
971
+ "example": "advanced/portfolio_report.py",
972
+ "verification": "test_portfolio.py"
973
+ },
974
+ {
975
+ "id": "legacy:Duration",
976
+ "region": "Native",
977
+ "path": ["extensions", "legacy", "Duration"],
978
+ "unit": "native",
979
+ "methodId": "engine_legacy_v1",
980
+ "availability": "supported",
981
+ "example": "advanced/portfolio_report.py",
982
+ "verification": "test_portfolio.py"
983
+ },
984
+ {
985
+ "id": "legacy:Exposure Time [%]",
986
+ "region": "Native",
987
+ "path": ["extensions", "legacy", "Exposure Time [%]"],
988
+ "unit": "native",
989
+ "methodId": "engine_legacy_v1",
990
+ "availability": "supported",
991
+ "example": "advanced/portfolio_report.py",
992
+ "verification": "test_portfolio.py"
993
+ },
994
+ {
995
+ "id": "legacy:Equity Final [$]",
996
+ "region": "Native",
997
+ "path": ["extensions", "legacy", "Equity Final [$]"],
998
+ "unit": "native",
999
+ "methodId": "engine_legacy_v1",
1000
+ "availability": "supported",
1001
+ "example": "advanced/portfolio_report.py",
1002
+ "verification": "test_portfolio.py"
1003
+ },
1004
+ {
1005
+ "id": "legacy:Equity Peak [$]",
1006
+ "region": "Native",
1007
+ "path": ["extensions", "legacy", "Equity Peak [$]"],
1008
+ "unit": "native",
1009
+ "methodId": "engine_legacy_v1",
1010
+ "availability": "supported",
1011
+ "example": "advanced/portfolio_report.py",
1012
+ "verification": "test_portfolio.py"
1013
+ },
1014
+ {
1015
+ "id": "legacy:Return [%]",
1016
+ "region": "Native",
1017
+ "path": ["extensions", "legacy", "Return [%]"],
1018
+ "unit": "native",
1019
+ "methodId": "engine_legacy_v1",
1020
+ "availability": "supported",
1021
+ "example": "advanced/portfolio_report.py",
1022
+ "verification": "test_portfolio.py"
1023
+ },
1024
+ {
1025
+ "id": "legacy:Buy & Hold Return [%]",
1026
+ "region": "Native",
1027
+ "path": ["extensions", "legacy", "Buy & Hold Return [%]"],
1028
+ "unit": "native",
1029
+ "methodId": "engine_legacy_v1",
1030
+ "availability": "supported",
1031
+ "example": "advanced/portfolio_report.py",
1032
+ "verification": "test_portfolio.py"
1033
+ },
1034
+ {
1035
+ "id": "legacy:Return (Ann.) [%]",
1036
+ "region": "Native",
1037
+ "path": ["extensions", "legacy", "Return (Ann.) [%]"],
1038
+ "unit": "native",
1039
+ "methodId": "engine_legacy_v1",
1040
+ "availability": "supported",
1041
+ "example": "advanced/portfolio_report.py",
1042
+ "verification": "test_portfolio.py"
1043
+ },
1044
+ {
1045
+ "id": "legacy:Volatility (Ann.) [%]",
1046
+ "region": "Native",
1047
+ "path": ["extensions", "legacy", "Volatility (Ann.) [%]"],
1048
+ "unit": "native",
1049
+ "methodId": "engine_legacy_v1",
1050
+ "availability": "supported",
1051
+ "example": "advanced/portfolio_report.py",
1052
+ "verification": "test_portfolio.py"
1053
+ },
1054
+ {
1055
+ "id": "legacy:CAGR [%]",
1056
+ "region": "Native",
1057
+ "path": ["extensions", "legacy", "CAGR [%]"],
1058
+ "unit": "native",
1059
+ "methodId": "engine_legacy_v1",
1060
+ "availability": "supported",
1061
+ "example": "advanced/portfolio_report.py",
1062
+ "verification": "test_portfolio.py"
1063
+ },
1064
+ {
1065
+ "id": "legacy:Sharpe Ratio",
1066
+ "region": "Native",
1067
+ "path": ["extensions", "legacy", "Sharpe Ratio"],
1068
+ "unit": "native",
1069
+ "methodId": "engine_legacy_v1",
1070
+ "availability": "supported",
1071
+ "example": "advanced/portfolio_report.py",
1072
+ "verification": "test_portfolio.py"
1073
+ },
1074
+ {
1075
+ "id": "legacy:Sortino Ratio",
1076
+ "region": "Native",
1077
+ "path": ["extensions", "legacy", "Sortino Ratio"],
1078
+ "unit": "native",
1079
+ "methodId": "engine_legacy_v1",
1080
+ "availability": "supported",
1081
+ "example": "advanced/portfolio_report.py",
1082
+ "verification": "test_portfolio.py"
1083
+ },
1084
+ {
1085
+ "id": "legacy:Calmar Ratio",
1086
+ "region": "Native",
1087
+ "path": ["extensions", "legacy", "Calmar Ratio"],
1088
+ "unit": "native",
1089
+ "methodId": "engine_legacy_v1",
1090
+ "availability": "supported",
1091
+ "example": "advanced/portfolio_report.py",
1092
+ "verification": "test_portfolio.py"
1093
+ },
1094
+ {
1095
+ "id": "legacy:Alpha [%]",
1096
+ "region": "Native",
1097
+ "path": ["extensions", "legacy", "Alpha [%]"],
1098
+ "unit": "native",
1099
+ "methodId": "engine_legacy_v1",
1100
+ "availability": "supported",
1101
+ "example": "advanced/portfolio_report.py",
1102
+ "verification": "test_portfolio.py"
1103
+ },
1104
+ {
1105
+ "id": "legacy:Beta",
1106
+ "region": "Native",
1107
+ "path": ["extensions", "legacy", "Beta"],
1108
+ "unit": "native",
1109
+ "methodId": "engine_legacy_v1",
1110
+ "availability": "supported",
1111
+ "example": "advanced/portfolio_report.py",
1112
+ "verification": "test_portfolio.py"
1113
+ },
1114
+ {
1115
+ "id": "legacy:Max. Drawdown [%]",
1116
+ "region": "Native",
1117
+ "path": ["extensions", "legacy", "Max. Drawdown [%]"],
1118
+ "unit": "native",
1119
+ "methodId": "engine_legacy_v1",
1120
+ "availability": "supported",
1121
+ "example": "advanced/portfolio_report.py",
1122
+ "verification": "test_portfolio.py"
1123
+ },
1124
+ {
1125
+ "id": "legacy:Avg. Drawdown [%]",
1126
+ "region": "Native",
1127
+ "path": ["extensions", "legacy", "Avg. Drawdown [%]"],
1128
+ "unit": "native",
1129
+ "methodId": "engine_legacy_v1",
1130
+ "availability": "supported",
1131
+ "example": "advanced/portfolio_report.py",
1132
+ "verification": "test_portfolio.py"
1133
+ },
1134
+ {
1135
+ "id": "legacy:Max. Drawdown Duration",
1136
+ "region": "Native",
1137
+ "path": ["extensions", "legacy", "Max. Drawdown Duration"],
1138
+ "unit": "native",
1139
+ "methodId": "engine_legacy_v1",
1140
+ "availability": "supported",
1141
+ "example": "advanced/portfolio_report.py",
1142
+ "verification": "test_portfolio.py"
1143
+ },
1144
+ {
1145
+ "id": "legacy:Avg. Drawdown Duration",
1146
+ "region": "Native",
1147
+ "path": ["extensions", "legacy", "Avg. Drawdown Duration"],
1148
+ "unit": "native",
1149
+ "methodId": "engine_legacy_v1",
1150
+ "availability": "supported",
1151
+ "example": "advanced/portfolio_report.py",
1152
+ "verification": "test_portfolio.py"
1153
+ },
1154
+ {
1155
+ "id": "legacy:# Trades",
1156
+ "region": "Native",
1157
+ "path": ["extensions", "legacy", "# Trades"],
1158
+ "unit": "native",
1159
+ "methodId": "engine_legacy_v1",
1160
+ "availability": "supported",
1161
+ "example": "advanced/portfolio_report.py",
1162
+ "verification": "test_portfolio.py"
1163
+ },
1164
+ {
1165
+ "id": "legacy:Win Rate [%]",
1166
+ "region": "Native",
1167
+ "path": ["extensions", "legacy", "Win Rate [%]"],
1168
+ "unit": "native",
1169
+ "methodId": "engine_legacy_v1",
1170
+ "availability": "supported",
1171
+ "example": "advanced/portfolio_report.py",
1172
+ "verification": "test_portfolio.py"
1173
+ },
1174
+ {
1175
+ "id": "legacy:Best Trade [%]",
1176
+ "region": "Native",
1177
+ "path": ["extensions", "legacy", "Best Trade [%]"],
1178
+ "unit": "native",
1179
+ "methodId": "engine_legacy_v1",
1180
+ "availability": "supported",
1181
+ "example": "advanced/portfolio_report.py",
1182
+ "verification": "test_portfolio.py"
1183
+ },
1184
+ {
1185
+ "id": "legacy:Worst Trade [%]",
1186
+ "region": "Native",
1187
+ "path": ["extensions", "legacy", "Worst Trade [%]"],
1188
+ "unit": "native",
1189
+ "methodId": "engine_legacy_v1",
1190
+ "availability": "supported",
1191
+ "example": "advanced/portfolio_report.py",
1192
+ "verification": "test_portfolio.py"
1193
+ },
1194
+ {
1195
+ "id": "legacy:Avg. Trade [%]",
1196
+ "region": "Native",
1197
+ "path": ["extensions", "legacy", "Avg. Trade [%]"],
1198
+ "unit": "native",
1199
+ "methodId": "engine_legacy_v1",
1200
+ "availability": "supported",
1201
+ "example": "advanced/portfolio_report.py",
1202
+ "verification": "test_portfolio.py"
1203
+ },
1204
+ {
1205
+ "id": "legacy:Max. Trade Duration",
1206
+ "region": "Native",
1207
+ "path": ["extensions", "legacy", "Max. Trade Duration"],
1208
+ "unit": "native",
1209
+ "methodId": "engine_legacy_v1",
1210
+ "availability": "supported",
1211
+ "example": "advanced/portfolio_report.py",
1212
+ "verification": "test_portfolio.py"
1213
+ },
1214
+ {
1215
+ "id": "legacy:Avg. Trade Duration",
1216
+ "region": "Native",
1217
+ "path": ["extensions", "legacy", "Avg. Trade Duration"],
1218
+ "unit": "native",
1219
+ "methodId": "engine_legacy_v1",
1220
+ "availability": "supported",
1221
+ "example": "advanced/portfolio_report.py",
1222
+ "verification": "test_portfolio.py"
1223
+ },
1224
+ {
1225
+ "id": "legacy:Profit Factor",
1226
+ "region": "Native",
1227
+ "path": ["extensions", "legacy", "Profit Factor"],
1228
+ "unit": "native",
1229
+ "methodId": "engine_legacy_v1",
1230
+ "availability": "supported",
1231
+ "example": "advanced/portfolio_report.py",
1232
+ "verification": "test_portfolio.py"
1233
+ },
1234
+ {
1235
+ "id": "legacy:Expectancy [%]",
1236
+ "region": "Native",
1237
+ "path": ["extensions", "legacy", "Expectancy [%]"],
1238
+ "unit": "native",
1239
+ "methodId": "engine_legacy_v1",
1240
+ "availability": "supported",
1241
+ "example": "advanced/portfolio_report.py",
1242
+ "verification": "test_portfolio.py"
1243
+ },
1244
+ {
1245
+ "id": "legacy:SQN",
1246
+ "region": "Native",
1247
+ "path": ["extensions", "legacy", "SQN"],
1248
+ "unit": "native",
1249
+ "methodId": "engine_legacy_v1",
1250
+ "availability": "supported",
1251
+ "example": "advanced/portfolio_report.py",
1252
+ "verification": "test_portfolio.py"
1253
+ },
1254
+ {
1255
+ "id": "legacy:Kelly Criterion",
1256
+ "region": "Native",
1257
+ "path": ["extensions", "legacy", "Kelly Criterion"],
1258
+ "unit": "native",
1259
+ "methodId": "engine_legacy_v1",
1260
+ "availability": "supported",
1261
+ "example": "advanced/portfolio_report.py",
1262
+ "verification": "test_portfolio.py"
1263
+ },
1264
+ {
1265
+ "id": "legacy:Commissions [$]",
1266
+ "region": "Native",
1267
+ "path": ["extensions", "legacy", "Commissions [$]"],
1268
+ "unit": "native",
1269
+ "methodId": "engine_legacy_v1",
1270
+ "availability": "supported",
1271
+ "example": "advanced/portfolio_report.py",
1272
+ "verification": "test_portfolio.py"
1273
+ },
1274
+ {
1275
+ "id": "legacy:# Closed Lots",
1276
+ "region": "Native",
1277
+ "path": ["extensions", "legacy", "# Closed Lots"],
1278
+ "unit": "native",
1279
+ "methodId": "engine_legacy_v1",
1280
+ "availability": "supported",
1281
+ "example": "advanced/portfolio_report.py",
1282
+ "verification": "test_portfolio.py"
1283
+ },
1284
+ {
1285
+ "id": "closedPnlGross",
1286
+ "region": "Metrics",
1287
+ "path": ["summary", "all", "closedPnlGross"],
1288
+ "unit": "money",
1289
+ "methodId": "openbacktesting_portfolio_v1",
1290
+ "availability": "supported",
1291
+ "example": "advanced/portfolio_report.py",
1292
+ "verification": "test_portfolio.py"
1293
+ },
1294
+ {
1295
+ "id": "totalPnlGross",
1296
+ "region": "Metrics",
1297
+ "path": ["summary", "all", "totalPnlGross"],
1298
+ "unit": "money",
1299
+ "methodId": "openbacktesting_portfolio_v1",
1300
+ "availability": "supported",
1301
+ "example": "advanced/portfolio_report.py",
1302
+ "verification": "test_portfolio.py"
1303
+ },
1304
+ {
1305
+ "id": "closedReturn",
1306
+ "region": "Metrics",
1307
+ "path": ["summary", "all", "closedReturn"],
1308
+ "unit": "ratio",
1309
+ "methodId": "openbacktesting_portfolio_v1",
1310
+ "availability": "supported",
1311
+ "example": "advanced/portfolio_report.py",
1312
+ "verification": "test_portfolio.py"
1313
+ },
1314
+ {
1315
+ "id": "buyHoldPnl",
1316
+ "region": "Metrics",
1317
+ "path": ["summary", "all", "buyHoldPnl"],
1318
+ "unit": "money",
1319
+ "methodId": "openbacktesting_portfolio_v1",
1320
+ "availability": "supported",
1321
+ "example": "advanced/portfolio_report.py",
1322
+ "verification": "test_portfolio.py"
1323
+ }
1324
+ ],
1325
+ "research": "docs/research/engine-portfolio-tradingview-report-design.md",
1326
+ "schemaVersion": "1.0.0",
1327
+ "regions": {
1328
+ "Key stats": [
1329
+ "totalPnl",
1330
+ "maxDrawdown",
1331
+ "winningCount",
1332
+ "closedFragmentCount",
1333
+ "winRate",
1334
+ "profitFactorMoney"
1335
+ ],
1336
+ "Performance": [
1337
+ "Performance:series.account",
1338
+ "Performance:series.closedCumulative",
1339
+ "Performance:series.benchmark",
1340
+ "List of Trades:trades.closedFragments"
1341
+ ],
1342
+ "Breakdown": [
1343
+ "grossProfit",
1344
+ "grossLoss",
1345
+ "profitFactorMoney",
1346
+ "commissionLoad",
1347
+ "Breakdown:analysis.breakdown"
1348
+ ],
1349
+ "Periodical": [
1350
+ "cagr",
1351
+ "totalReturn",
1352
+ "sharpe",
1353
+ "sortino",
1354
+ "Periodical:analysis.periodical"
1355
+ ],
1356
+ "Benchmarking": [
1357
+ "buyHoldReturn",
1358
+ "outperformance",
1359
+ "correlation",
1360
+ "Benchmarking:series.benchmark"
1361
+ ],
1362
+ "Margin usage": [
1363
+ "marginEfficiency",
1364
+ "averageMarginUsed",
1365
+ "marginCalls",
1366
+ "totalMarginLiquidatedVolume",
1367
+ "Margin usage:series.margin"
1368
+ ],
1369
+ "Growth and decline": [
1370
+ "maxDrawdown",
1371
+ "maxDrawdownFraction",
1372
+ "maxDrawdownInitialFraction",
1373
+ "Growth and decline:analysis.growthAndDecline"
1374
+ ],
1375
+ "Distribution": [
1376
+ "expectedPayoff",
1377
+ "largestProfit",
1378
+ "largestLoss",
1379
+ "Distribution:analysis.distribution"
1380
+ ],
1381
+ "Streaks": ["Streaks:analysis.streaks"],
1382
+ "Time patterns": ["Time patterns:analysis.timePatterns"],
1383
+ "List of Trades": [
1384
+ "List of Trades:trades.closedFragments",
1385
+ "List of Trades:trades.openLots"
1386
+ ]
1387
+ },
1388
+ "tradeColumns": {
1389
+ "Trade number": "fragmentId/displayOrdinal",
1390
+ "Long/Short": "direction",
1391
+ "Type": "entry/exit/status",
1392
+ "Date and time": "entry.time/exit.time",
1393
+ "Signal": "entry.signal/exit.signal",
1394
+ "Price": "entry.price/exit.price",
1395
+ "Size": "quantity/entryNotional/exitNotional",
1396
+ "Net PnL": "pnlNet",
1397
+ "Return": "returnFraction",
1398
+ "Commission": "feeTotal",
1399
+ "Favorable excursion": "excursion.mfeMoney/mfeFraction",
1400
+ "Adverse excursion": "excursion.maeMoney/maeFraction",
1401
+ "Cumulative PnL": "cumulativeClosedPnl/fractionOfInitialCapital",
1402
+ "Duration (bars)": "barsHeld/barsElapsed/durationNs"
1403
+ }
1404
+ }