PortfolioTradingEnvironment<T>

Models & Types · AiDotNet.Finance.Trading.Environments

Multi-asset portfolio trading environment with continuous weight actions.

Inheritance: TradingEnvironment<T> → PortfolioTradingEnvironment<T>

For Beginners

Instead of buy/hold/sell, the agent says “I want 40% in asset A and 60% in asset B” every step. The environment rebalances the portfolio to match those weights.

How It Works

PortfolioTradingEnvironment interprets the action vector as target portfolio weights for each asset. It rebalances positions accordingly.

Constructors

Constructor Summary
PortfolioTradingEnvironment(Tensor<T> marketData, int windowSize, T initialCapital, double transactionCost, bool allowShortSelling, bool randomStart, int maxEpisodeLength, int? seed) Creates a portfolio trading environment.

Properties

Property Summary
bool IsContinuousActionSpace { get; }
int ActionSpaceSize { get; }