Main class for running ANNEM simulations. Manages agents, networks, market data, and simulation execution. Provides comprehensive analysis and validation capabilities.

Arguments

n_agents

Number of agents (default: 1000)

symbols

Character vector of stock symbols Run ANNEM Simulation

n_steps

Number of simulation steps (default: 250)

verbose

Logical, whether to print progress (default: TRUE)

Value

List containing simulation results Analyze Agent Performance

Data frame with agent performance metrics Calculate Sharpe Ratios

Numeric vector of Sharpe ratios for each agent Analyze Network Evolution

Data frame with network evolution metrics Compare with Benchmark Models

Data frame with model comparison results

Details

The ANNEMMarket class orchestrates the entire simulation environment including:

  • Agent population management

  • Dynamic network evolution

  • Market data integration

  • Sentiment analysis

  • Performance tracking and validation

Fields

agents

List of ANNEMAgent objects

market_data

List containing prices, returns, volatility data

network

igraph network object representing agent connections

sentiment_data

Numeric vector of sentiment scores

simulation_results

List containing simulation outputs

Methods

analyze_agent_performance()

Calculate comprehensive performance metrics for all agents

analyze_network_evolution()

Calculate network topology metrics over simulation time

calculate_sharpe_ratios()

Calculate annualized Sharpe ratios for all agents

compare_with_benchmarks()

Compare ANNEM performance with VAR and Random Walk models

initialize( n_agents = 1000, symbols = c("AAPL", "GOOGL", "MSFT", "TSLA", "NVDA") )

Initialize ANNEM market environment with agents and data

run_simulation(n_steps = 250, verbose = TRUE)

Execute complete ANNEM simulation with agents, networks, and markets

Examples

if (FALSE) { # \dontrun{
# Create market with 100 agents
market <- ANNEMMarket$new(n_agents = 100, symbols = c("AAPL", "MSFT"))

# Run simulation
results <- market$run_simulation(n_steps = 50)

# Analyze performance
performance <- market$analyze_agent_performance()
} # }