Views
No views yet
stable-baselines3 on a custom OpenAI Gym environment simulating the US Stock Market (AAPL, MSFT, GOOGL).TradingEnv)0: HOLD, 1: BUY, 2: SELL.1import gymnasium as gym
2from stable_baselines3 import PPO
3
4# Load the environment (custom wrapper required)
5# env = TradingEnv(df)
6
7# Load model
8model = PPO.load("ppo_AAPL.zip")
9
10# Predict
11action, _ = model.predict(obs, deterministic=True)results/ CSVs for detailed Sharpe Ratios and Max Drawdown stats per agent.