Create synthetic market data for testing and simulation purposes. Useful when real market data is unavailable or for controlled experiments.

generate_synthetic_data(
  n_days = 252,
  n_assets = 1,
  initial_price = 100,
  annual_return = 0.08,
  annual_volatility = 0.2,
  correlation_matrix = NULL
)

Arguments

n_days

Number of trading days to simulate

n_assets

Number of assets to simulate

initial_price

Initial price for all assets (default: 100)

annual_return

Expected annual return (default: 0.08)

annual_volatility

Annual volatility (default: 0.20)

correlation_matrix

Optional correlation matrix between assets

Value

List with same structure as load_market_data()

Examples

if (FALSE) { # \dontrun{
synthetic_data <- generate_synthetic_data(n_days = 252, n_assets = 3)
plot(synthetic_data$prices[, 1], type = "l", main = "Synthetic Price Series")
} # }