tradesimr: Execution and Simulation Engine for Trading Strategies
An R-native trading simulation package with a C++ execution core that turns
strategy intentions and explicit orders into simulated trades, positions,
cash, profit and loss, risk, and performance outputs under configurable
execution, margin, funding, and cost assumptions. The package provides
historical replay, incremental exchange stepping, durable event tables,
append-only agent command logs, registered assets, per-agent
shared-cash cross-margin live accounts, AI agent competitors, scheduled
live-feed stepping, strategy-backed AI agents with diagnostics, calibrated
and coordinated multi-asset market simulation with static covariance,
AR-GARCH, factor, and regime models, durable per-feed simulation state,
profile-aware heterogeneous inventory and margin execution with atomic
mixed-profile order groups, optional portfolio-margin enforcement through
a multi-asset C++ step kernel, local live-service APIs, import/export
helpers, separate replay, live-state, and agent dashboard exports, and installed local
orchestration scripts. It is designed to consume signals, order intents, or
target exposure decisions from compatible strategy packages and market data
from compatible adapters.
| Version: |
0.18.7 |
| Depends: |
R (≥ 4.2.0) |
| Imports: |
data.table, Rcpp, R6 |
| LinkingTo: |
Rcpp |
| Suggests: |
testthat, fst, ggplot2, jsonlite, lubridate, plumber, strategyr, zoo |
| Published: |
2026-10-08 |
| DOI: |
10.32614/CRAN.package.tradesimr (may not be active yet) |
| Author: |
Oliver Zhou [aut, cre] |
| Maintainer: |
Oliver Zhou <oliver.yxzhou at gmail.com> |
| BugReports: |
https://github.com/OliverLDS/tradesimr/issues |
| License: |
MIT + file LICENSE |
| URL: |
https://github.com/OliverLDS/tradesimr |
| NeedsCompilation: |
yes |
| Materials: |
README, NEWS |
| CRAN checks: |
tradesimr results |
Documentation:
Downloads:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=tradesimr
to link to this page.