# NOT RUN {
# Load up sample data
data(sample_secref)
data(sample_pricing)
data(sample_inputs)
# Load sample configuration
config <- example_strategy_config()
# Create the Simulation object and run
sim <- Simulation$new(config,
raw_input_data = sample_inputs,
raw_pricing_data = sample_pricing,
security_reference_data = sample_secref)
sim$run()
# Print overall statistics
sim$overallStatsDf()
# Access tabular result data
head(sim$getSimSummary())
head(sim$getSimDetail())
head(sim$getPositionSummary())
head(sim$getInputStats())
head(sim$getOptimizationSummary())
head(sim$getExposures())
# Plot results
# }
# NOT RUN {
sim$plotPerformance()
sim$plotMarketValue()
sim$plotCategoryExposure("category_1")
sim$plotFactorExposure(c("factor_1", "factor_2", "factor_3"))
sim$plotNumPositions()
# }
Run the code above in your browser using DataLab