You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fe179c9
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+59-9Lines changed: 59 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,10 @@
38
38
39
39
<br>
40
40
41
+
Tradix is a high-performance backtesting engine built for quantitative traders and researchers. Powered by pure NumPy vectorization, it runs 1,000 parameter optimizations in under a second. No boilerplate, no configuration files, no data pipeline setup — just install and backtest.
42
+
43
+
The library ships with 33 battle-tested strategies, 60+ technical indicators, and a built-in data feed that auto-downloads from global exchanges including KRX (Korea Exchange). Whether you're prototyping a Golden Cross on Samsung Electronics or stress-testing a multi-factor portfolio against Black Swan scenarios, Tradix handles the entire pipeline: data → signals → execution → analytics → visualization.
44
+
41
45
> **Two lines.**`backtest` · `show` — that's the entire workflow.
42
46
43
47
```python
@@ -63,7 +67,7 @@ result.show()
63
67
result.show(style="bloomberg")
64
68
```
65
69
66
-
> `backtest()` auto-downloads data via FinanceDataReader, runs the strategy with commission and slippage, and returns a full result object.
70
+
`backtest()` auto-downloads price data via FinanceDataReader, applies the strategy with realistic commission and slippage modeling, and returns a comprehensive result object. Pass any ticker symbol — US stocks, Korean stocks, ETFs, indices, and crypto are all supported out of the box.
67
71
68
72
```
69
73
=== Backtest Result ===
@@ -82,6 +86,8 @@ Win Rate: 61.1%
82
86
83
87
## ◈ Why Tradix?
84
88
89
+
Most backtesting frameworks require hundreds of lines of boilerplate — data loaders, strategy classes, broker configs, result parsers. Tradix eliminates all of that. Here's how it compares:
90
+
85
91
<table>
86
92
<tr><td>
87
93
@@ -101,13 +107,19 @@ Win Rate: 61.1%
101
107
</td></tr>
102
108
</table>
103
109
110
+
> **Three pillars.**`numpy` · `pandas` · `scipy` — that's the entire foundation. No C extensions, no binary dependencies, no compilation step.
111
+
104
112
<br>
105
113
106
114
## ◈ Features
107
115
108
116
<detailsopen>
109
117
<summary><b>Core Engine</b></summary>
110
118
119
+
<br>
120
+
121
+
The heart of Tradix is a dual-engine architecture: an event-driven engine for complex strategies with bar-by-bar logic, and a vectorized engine for lightning-fast batch operations. Both engines share the same indicator library and produce identical results.
122
+
111
123
| Feature | Description |
112
124
|:--------|:------------|
113
125
|**Vectorized Engine**| NumPy-powered core, 100x faster than event-driven loops |
@@ -124,6 +136,10 @@ Win Rate: 61.1%
124
136
<details>
125
137
<summary><b>Advanced Analytics</b></summary>
126
138
139
+
<br>
140
+
141
+
Go beyond simple returns. Tradix provides institutional-grade analytics that dissect every aspect of your strategy — from 12-dimensional DNA fingerprinting to Black Swan resilience scoring. Understand not just *how much* your strategy made, but *why* it works and *when* it might fail.
Tradix pushes the boundary of what a backtesting library can do. Monte Carlo simulations with 10,000 paths estimate your ruin probability. Fractal analysis reveals whether your market is trending or mean-reverting. Regime detection identifies hidden market states so you can adapt your strategy dynamically.
163
+
144
164
| Feature | Description |
145
165
|:--------|:------------|
146
166
|**Monte Carlo**| 10K-path bootstrap with ruin probability and confidence bands |
No browser needed. Tradix renders professional trading dashboards directly in your terminal using Rich and Plotext. Choose from three display styles inspired by TradingView, Bloomberg Terminal, and hedge fund reports. The interactive Textual dashboard provides a full 5-view experience with keyboard navigation.
Tradix is the first backtesting engine built with native Korean market support. Transaction tax (0.18%), brokerage fees, and KRX stock name mapping are all built-in. You can even write your entire strategy in Korean — function names, variable names, and output are all available in 한국어.
Tradix offers multiple levels of abstraction. Start with the 2-line easy API, graduate to the declarative strategy builder for custom logic, or drop down to the full event-driven engine when you need bar-by-bar control.
244
+
213
245
### Declarative Strategy Builder
214
246
215
247
```python
@@ -231,6 +263,8 @@ result.show()
231
263
232
264
### Parameter Optimization
233
265
266
+
Find optimal strategy parameters by sweeping across a parameter grid. Tradix runs all combinations using the vectorized engine — 1,000 combinations finish in under a second.
Every function, every strategy, every output — available in native Korean. No wrappers, no translation layers. First-class Korean market citizen.
261
299
262
300
```python
263
301
from tradix import 백테스트, 골든크로스
@@ -380,6 +418,8 @@ mc = simulator.monteCarloSimulation(horizon=252, nSim=10000)
380
418
381
419
## ◈ Strategies
382
420
421
+
33 production-ready strategies organized by trading style. Each strategy is a callable that returns a configured strategy object — no subclassing, no boilerplate. Pass parameters to customize, or use the defaults.
422
+
383
423
<detailsopen>
384
424
<summary><b>Trend Following (9)</b></summary>
385
425
@@ -457,6 +497,8 @@ mc = simulator.monteCarloSimulation(horizon=252, nSim=10000)
457
497
458
498
## ◈ Indicators
459
499
500
+
60+ technical indicators implemented in pure NumPy. Each indicator is available as both a standalone function and a strategy-builder condition. All calculations are vectorized — even complex indicators like Ichimoku Cloud run in microseconds.
@@ -471,7 +513,7 @@ mc = simulator.monteCarloSimulation(horizon=252, nSim=10000)
471
513
472
514
## ◈ Performance
473
515
474
-
Benchmarked on 10 years of daily data (2,458 bars):
516
+
Tradix is built for speed. The vectorized engine processes entire price histories as contiguous NumPy arrays, eliminating Python loop overhead. Benchmarked on 10 years of daily data (2,458 bars):
475
517
476
518
| Operation | Time |
477
519
|:----------|:-----|
@@ -485,6 +527,8 @@ Benchmarked on 10 years of daily data (2,458 bars):
485
527
486
528
## ◈ Terminal UI
487
529
530
+
Professional trading dashboards rendered directly in your terminal. No browser, no GUI toolkit, no Jupyter dependency. Tradix uses Rich for styled tables and panels, Plotext for ASCII charts, and optionally Textual for a full interactive experience.
531
+
488
532
### Display Styles
489
533
490
534
```python
@@ -535,6 +579,8 @@ launchDashboard(result)
535
579
536
580
## ◈ Advanced Analytics
537
581
582
+
Tradix includes a full suite of institutional-grade analytics. Each analyzer takes a backtest result and returns a structured report with scores, metrics, and actionable insights.
Tradix follows a modular architecture. Each subsystem is independently importable, so you can use just the indicators, just the risk engine, or the full pipeline.
674
+
627
675
```
628
676
tradix/
629
677
├── engine.py # Core backtest engine
@@ -652,6 +700,8 @@ tradix/
652
700
653
701
## ◈ Contributing
654
702
703
+
Contributions are welcome. Fork the repo, create a feature branch, and submit a pull request.
0 commit comments