Code Strategies in Python, with Structure Built In
The Coding Workspace is designed for developers and researchers who want full control in Python without rebuilding data handling, backtesting and reporting from scratch.
Most of the effort in a homemade backtester goes into data loading, order bookkeeping and reporting, not the strategy itself. Studio is designed to provide those pieces so your code can focus on signals, sizing and risk.
Product status: Quantzivo Studio is in development. Features described here reflect the planned scope and may change before release.
Write entries, exits and sizing logic in Python using a documented strategy interface.
Planned connectors for importing your own data and exporting results to other tools.
Starting points for common strategy structures that you adapt and extend.
Separate data, signals, sizing, risk and reporting so each part can be tested on its own.
Explore data and prototype signals interactively before committing to a strategy.
A repeatable path from prototype to backtest to paper trading, with logs at each step.
Readable tracebacks and per-bar logs that point to the line and date where a problem started.
Each run is tied to the code version and parameters that produced it.
A strategy that mixes data cleaning, signal logic and order bookkeeping in one loop is hard to debug and easy to get subtly wrong. Studio's planned structure keeps each concern in its own place.
The example on the right shows the shape of a strategy class. The syntax is illustrative and the final SDK may differ.
from quantzivo import Strategy, Backtest
class TrendPullback(Strategy):
"""Educational example: buy pullbacks above the 200-day trend."""
params = dict(rsi_len=14, entry=30, exit=55, risk=0.05)
def signals(self, bar):
rsi = self.ind.rsi(bar.close, self.p.rsi_len)
uptrend = bar.close > self.ind.sma(bar.close, 200)
return rsi < self.p.entry and uptrend, rsi > self.p.exit
def next(self, bar):
enter, leave = self.signals(bar)
if enter and not self.position:
self.buy(size=self.p.risk) # share of equity
elif leave:
self.close()
# costs and slippage are explicit, never assumed to be zero
report = Backtest(TrendPullback, costs_bps=5, slippage_bps=2).run()
| Layer | Responsibility | Why it is separate |
|---|---|---|
| Data | Load, validate and align price and volume history | Data errors are the most common source of misleading backtests. |
| Signals | Turn market data into entry and exit conditions | Signal logic can be unit-tested without placing simulated orders. |
| Sizing | Decide how much to allocate per position | Position size often matters more to risk than the entry rule. |
| Risk | Apply stops, limits and exposure caps | Risk rules should hold no matter which signal triggered the trade. |
| Execution model | Simulate fills, costs and slippage | Assumptions are configured once and applied consistently. No real orders are sent. |
| Reporting | Produce metrics, charts and trade logs | Every strategy is evaluated with the same definitions. |
Inspect data and prototype a signal in a research notebook.
Move the logic into a strategy class, starting from a template.
Notebooks are ideal for asking questions of data and terrible for keeping track of what you tested. Studio is designed to pair the two: explore in a notebook, then promote a finished idea into a versioned strategy file.
Templates provide structure for common research patterns. They are educational scaffolding and come with no expectation of performance.
Moving-average or breakout entries with trailing exits, for studying how trend rules behave across regimes.
Oscillator-based entries with time and target exits, for testing short-term pullback ideas.
Rank a universe by a metric and rebalance on a schedule, for studying momentum or factor-style ideas.
The bare strategy structure with data, signal, sizing and risk hooks, for writing your own logic from scratch.
Integration plans focus on research data and results. Specific data sources and formats will be confirmed closer to release.
Load your own historical data from common file formats such as CSV.
Planned support for pulling data you have access to from generic REST sources.
Export trades, metrics and equity curves for your own analysis tools.
Integrations are for research. Studio is not designed to send orders to any broker.