Computes various types of network weights for use in network-informed analysis.
Supports correlation-based, geographic, economic similarity, and composite weights.
Usage
calculate_network_weights(
returns_data,
weight_types = c("correlation", "geographic", "economic", "composite"),
geographic_groups = NULL
)
Arguments
- returns_data
xts object or matrix with financial returns
- weight_types
Character vector specifying which weights to calculate
Options: "correlation", "geographic", "economic", "composite"
- geographic_groups
Optional named list defining geographic regions
Value
Named list containing different weight matrices
Examples
if (FALSE) { # \dontrun{
# Calculate all weight types
weights <- calculate_network_weights(returns_data)
# Calculate only correlation weights
cor_weights <- calculate_network_weights(returns_data, "correlation")
} # }