Skip to content
ai-supply.store
DiscoverCategoriesLeaderboardsCommunityAgent APIFAQ
Sign inSign up free
catalog / Finance / FinRL — Deep Reinforcement Learning for Trading
◉AgentFinanceFree

FinRL — Deep Reinforcement Learning for Trading

AI4Finance Foundation's framework for training RL agents to trade stocks, crypto, and forex with backtesting, paper trading, and live execution support.

@ai-supply
Installs86k
⟳ upstream v0.3.8 · updated 4mo ago
↗ Source repository
← More FinanceFinance leaderboard →How we grade security →Source ↗
! Grade D · 33/100 · ReviewSecurity assessment
1compromise signal17capabilities surfaced1known CVE7of 20 OWASP controls clear
Embedded credentialsExternal endpoints declaredSuspicious network referencesExternal endpoints declared
scanned 16d ago·osv · gitleaks · opengrep · picklescan + heuristics·full breakdown in the Security tab ↓

FinRL — Deep Reinforcement Learning for Trading

FinRL is a comprehensive deep reinforcement learning library for automated stock trading. It provides a full pipeline from market data download to RL agent training (DQN, PPO, A2C, SAC, TD3, DDPG) and backtesting, supporting US equities, crypto, forex, Chinese A-shares, and futures markets.

Key Features

  • Gym-compatible trading environments with realistic transaction costs and slippage
  • Built-in RL agents via Stable-Baselines3 and ElegantRL backends
  • Data pipelines: Yahoo Finance, Alpaca, Binance, AkShare, WRDS
  • Ensemble strategies combining multiple RL agents
  • Paper trading mode via Alpaca and CCXT
  • Cryptocurrency and multi-asset portfolio support

Quick Start

from finrl.meta.preprocessor.yahoodownloader import YahooDownloader
from finrl.meta.env_stock_trading.env_stocktrading import StockTradingEnv
from finrl.agents.stablebaselines3.models import DRLAgent

df = YahooDownloader(start_date="2020-01-01", end_date="2023-12-31",
                     ticker_list=["AAPL","MSFT","GOOG"]).fetch_data()
env = StockTradingEnv(df=df, ...)
agent = DRLAgent(env=env)
model = agent.get_model("ppo")
model.learn(total_timesteps=100_000)
npx ai-supply add finrl-deep-rl-trading

Curated mirror of the open-source FinRL (MIT). Get it from the source.

Rating rank
#1
of 15 in Finance
Install rank
#6
of 15 in Finance
Security score
33/100 · D
review
Security rank
#15
of 15 in Finance
Installs
86k
cat avg 85k
This listing vs category average
Installs
this
cat avg
Security (of 100)
this
cat avg
Adoption trend
See the Finance leaderboard →
! Security: Review · 3333/100 · grade Dscanned 16d ago
⚠ 1 compromise signal18 risk-surface · 8/20 OWASP controls flagged

Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.

What this capability can do · med confidence (static)
⚑ filesystem⚑ shell⚑ network
egress → static.pepy.tech, pepy.tech, img.shields.io, discord.gg, www.python.org, pypi.org, readthedocs.org, finrl.readthedocs.io +32

Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).

OWASP Top 10 for LLM Applications
⚠LLM02Sensitive Information Disclosurecompromise · high
Secrets, credentials or PII shipped inside the artifact.
•Embedded credentials — found: hardcoded credential · AI4Finance-Foundation-FinRL-220f9e4/finrl/applications/imitation_learning/Stock_Selection.ipynb (CWE-798)compromise
•Low-confidence secret match — 2 possible: generic-api-key · AI4Finance-Foundation-FinRL-220f9e4/finrl/meta/preprocessor/example_of_shioaji_api.py (CWE-798)risk surface
•Low-confidence secret match — 2 possible: generic-api-key · AI4Finance-Foundation-FinRL-220f9e4/finrl/meta/preprocessor/shioajidownloader.py (CWE-798)risk surface
•Low-confidence secret match — 1 possible: generic-api-key · AI4Finance-Foundation-FinRL-220f9e4/finrl/applications/imitation_learning/Stock_Selection.ipynb (CWE-798)risk surface
•Low-confidence secret match — 1 possible: generic-api-key · AI4Finance-Foundation-FinRL-220f9e4/finrl/applications/imitation_learning/Imitation_Sandbox.ipynb (CWE-798)risk surface
•Low-confidence secret match — 1 possible: generic-api-key · AI4Finance-Foundation-FinRL-220f9e4/finrl/applications/imitation_learning/Weight_Initialization.ipynb (CWE-798)risk surface
⚠LLM07System Prompt Leakagecompromise · high
Secrets, internal hosts or proprietary logic exposed in shipped prompts.
•Internal host / private infrastructure reference — shipped content references a private IP range or internal-only host · AI4Finance-Foundation-FinRL-220f9e4/examples/FinRL_Ensemble_StockTrading_ICAIF_2020.ipynb (CWE-200)risk surface
•Embedded credentials — found: hardcoded credential · AI4Finance-Foundation-FinRL-220f9e4/finrl/applications/imitation_learning/Stock_Selection.ipynb (CWE-798)compromise
•Low-confidence secret match — 2 possible: generic-api-key · AI4Finance-Foundation-FinRL-220f9e4/finrl/meta/preprocessor/example_of_shioaji_api.py (CWE-798)risk surface
•Low-confidence secret match — 2 possible: generic-api-key · AI4Finance-Foundation-FinRL-220f9e4/finrl/meta/preprocessor/shioajidownloader.py (CWE-798)risk surface
•Low-confidence secret match — 1 possible: generic-api-key · AI4Finance-Foundation-FinRL-220f9e4/finrl/applications/imitation_learning/Stock_Selection.ipynb (CWE-798)risk surface
•Low-confidence secret match — 1 possible: generic-api-key · AI4Finance-Foundation-FinRL-220f9e4/finrl/applications/imitation_learning/Imitation_Sandbox.ipynb (CWE-798)risk surface
•Low-confidence secret match — 1 possible: generic-api-key · AI4Finance-Foundation-FinRL-220f9e4/finrl/applications/imitation_learning/Weight_Initialization.ipynb (CWE-798)risk surface
⚠LLM03Supply Chaincritical
Vulnerable/compromised dependencies, models or archives in the artifact.
•Dependency manifest — 35 pip requirements declared · AI4Finance-Foundation-FinRL-220f9e4/requirements.txtrisk surface
•Vulnerable dependencies — 247 known vulnerabilities in: aiohttp@3.8.1, black@24.3.0, bleach@6.0.0, cryptography@43.0.1, filelock@3.12.0, fonttools@4.43.0, idna@3.7, jinja2@3.1.5 (CWE-1395)known CVE · -25 pts
⚠LLM05Improper Output Handlingmedium
Code that pipes model/user output into shell, eval, SQL or paths unsafely.
•Suspicious code patterns — OS command execution · AI4Finance-Foundation-FinRL-220f9e4/finrl/meta/data_processors/func.py (CWE-78)risk surface
⚠LLM06Excessive Agencymedium
Over-broad tool/permission surface or unrestricted egress.
•External endpoints declared — 1 distinct host(s) · AI4Finance-Foundation-FinRL-220f9e4/.pre-commit-config.yamlrisk surface
•External endpoints declared — 44 distinct host(s) · AI4Finance-Foundation-FinRL-220f9e4/README.mdrisk surface
•External endpoints declared — 2 distinct host(s) · AI4Finance-Foundation-FinRL-220f9e4/docs/source/developer_guide/contributing.rstrisk surface
•External endpoints declared — 5 distinct host(s) · AI4Finance-Foundation-FinRL-220f9e4/docs/source/developer_guide/development_setup.rstrisk surface
•External endpoints declared — 3 distinct host(s) · AI4Finance-Foundation-FinRL-220f9e4/docs/source/index.rstrisk surface
•External endpoints declared — 4 distinct host(s) · AI4Finance-Foundation-FinRL-220f9e4/docs/source/reference/publication.mdrisk surface
•External endpoints declared — 9 distinct host(s) · AI4Finance-Foundation-FinRL-220f9e4/docs/source/reference/reference.mdrisk surface
•External endpoints declared — 6 distinct host(s) · AI4Finance-Foundation-FinRL-220f9e4/examples/FinRL_Ensemble_StockTrading_ICAIF_2020.ipynbrisk surface
⚠LLM10Unbounded Consumptionmedium
Unbounded loops/recursion causing DoS or runaway cost.
Enforced at runtime by the gateway (rate limits + spend caps + size caps); static check flags unbounded loops.
•Potentially unbounded loop — an infinite loop (while True / while(1) / for(;;)) may cause runaway consumption · AI4Finance-Foundation-FinRL-220f9e4/examples/FinRL_PaperTrading_Demo.ipynb (CWE-835)risk surface
§LLM09MisinformationGovernance
Artifacts designed to produce false/deceptive output.
Detectable only by runtime behavioral evaluation; addressed via responsible-use attestation.
✓LLM01Prompt InjectionPassed
✓LLM04Data and Model PoisoningPassed
Backdoors/poisoning in training data or serialized models.
Behavioral poisoning needs model execution; static check covers unsafe serialization + dataset skew only.
✓LLM08Vector and Embedding WeaknessesPassed
PII or plaintext source leakage in embedding/vector exports.
Embedding inversion/poisoning is largely runtime; static check covers PII in vector exports.
OWASP Machine Learning Security Top 10
⚠ML06AI Supply Chaincritical
Compromised PyPI/npm packages, typosquats, unsafe serialized models.
•Dependency manifest — 35 pip requirements declared · AI4Finance-Foundation-FinRL-220f9e4/requirements.txtrisk surface
•Vulnerable dependencies — 247 known vulnerabilities in: aiohttp@3.8.1, black@24.3.0, bleach@6.0.0, cryptography@43.0.1, filelock@3.12.0, fonttools@4.43.0, idna@3.7, jinja2@3.1.5 (CWE-1395)known CVE · -25 pts
⚠ML09Output Integritymedium
Middleware tampering with model outputs in transit.
Gateway enforces TLS + response integrity; static check flags output-rewriting code.
•Suspicious code patterns — OS command execution · AI4Finance-Foundation-FinRL-220f9e4/finrl/meta/data_processors/func.py (CWE-78)risk surface
§ML01Input Manipulation (Adversarial)Governance
Models vulnerable to adversarial perturbations.
Requires runtime robustness evaluation; addressed via publisher robustness attestation.
§ML03Model InversionGovernance
Training data reconstructable from a model's outputs.
Runtime/evaluation property; addressed via model-card data-provenance + DP attestation.
§ML04Membership InferenceGovernance
Determining whether a record was in the training set.
Runtime/evaluation property; addressed via overfitting disclosure + DP attestation.
§ML08Model SkewingGovernance
Models trained on skewed data producing biased output.
Requires fairness evaluation; addressed via model-card bias/limitations disclosure.
✓ML02Data PoisoningPassed
Poisoned training datasets with triggers or anomalous distributions.
Static check covers trigger phrasing, PII and label skew; full poisoning detection is runtime.
✓ML05Model TheftPassed
Unlicensed re-distribution / license-incompatible derivatives.
Static check verifies license declaration; extraction throttling is runtime.
✓ML07Transfer Learning AttackPassed
Backdoored base models / LoRA adapters propagating to derivatives.
Backdoor detection needs behavioral probing; static check covers unsafe serialization + provenance.
✓ML10Model Poisoning (Weights)Passed
Tampered model weight files; integrity must be verifiable.
Static check enforces safe formats + records a content hash for downstream verification.
Other findings (6) · hygiene / uncategorized
•Unrecognized file type — '.gitignore' is not on the allowlist · AI4Finance-Foundation-FinRL-220f9e4/.gitignorerisk surface
•Unrecognized file type — '.32' is not on the allowlist · AI4Finance-Foundation-FinRL-220f9e4/1.66.32risk surface
•Unrecognized file type — '.?' is not on the allowlist · AI4Finance-Foundation-FinRL-220f9e4/LICENSErisk surface
•Suspicious network references — suspicious TLD (89 URLs) · AI4Finance-Foundation-FinRL-220f9e4/README.mdrisk surface
•Disallowed file type — '.bat' executables are not permitted · AI4Finance-Foundation-FinRL-220f9e4/docs/make.bat (CWE-434)risk surface
•Unrecognized file type — '.cfg' is not on the allowlist · AI4Finance-Foundation-FinRL-220f9e4/setup.cfgrisk surface
✔ verified source · pinned AI4Finance-Foundation-FinRL-220f9e4
Check against a policy

The same gate an agent runs before installing (POST /api/v1/trust/finrl-deep-rl-trading/check). Click a policy:

Consume FinRL — Deep Reinforcement Learning for Trading programmatically. Authenticate with an API key or session — see Authorize an agent.

# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/finrl-deep-rl-trading

# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/finrl-deep-rl-trading/check \
  -H "Content-Type: application/json" \
  -d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'

# CLI
npx ai-supply add finrl-deep-rl-trading

# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/finrl-deep-rl-trading/install \
  -H "Authorization: Bearer $AIM_KEY"

# MCP tool
install_listing({ "slug": "finrl-deep-rl-trading" })
OpenAPI spec →
vlatest
! Security: Review · 331mo ago

Curated mirror — latest upstream source. See the repository for tagged releases.

Sign in and install this listing to leave a review.

More from @ai-supply

View profile →
◉Agent
MetaGPT
Multi-agent framework that assigns GPT roles (PM, engineer, QA) to solve complex software tasks end-to-end.
↓ 1.0M
⇄Connector
vLLM
High-throughput, memory-efficient LLM inference engine with PagedAttention and continuous batching.
↓ 892k
⇄Connector
Meilisearch
Lightning-fast open-source search engine with typo-tolerance, semantic hybrid search, and sub-50ms response times.
↓ 811k
△Eval
Weights & Biases (wandb)
ML experiment tracking and visualization — log metrics, hyperparameters, models, and media in real time.
↓ 784k
ai-supply.store

Free, security-vetted AI capabilities — skills, MCPs, plugins, agents, datasets and more, each graded and freshness-tracked, and built for humans and agents alike.

api · v3.1status · all green
Contact
support@ai-supply.storesecurity@ai-supply.store
Catalog
  • Discover
  • Categories
  • Leaderboards
  • Benchmarks
  • Security
  • Scan a repo
Community
  • Community
  • FAQ
For agents
  • Quickstart (60s)
  • Authorize an agent
  • Agent API
  • OpenAPI spec
For builders
  • Publish
  • Dashboard
Account
  • Create account
  • Sign in
  • Settings
Legal
  • Terms
  • Publisher Agreement
  • Acceptable Use
  • Privacy