Skip to contents

The didTEnets package implements the Transfer Entropy-informed Difference-in-Differences (TE-DiD) framework for policy evaluation in interconnected systems. This methodology combines network analysis with causal inference to measure policy effects on financial contagion and systemic risk transmission.

Key Features

  • Network-based contagion analysis using transfer entropy

  • Policy impact assessment with spillover effects

  • Financial network visualization and evolution analysis

  • Robust difference-in-differences estimation with two-way fixed effects

  • Comprehensive crisis period analysis tools

Main Functions

Methodology

The TE-DiD framework addresses limitations of traditional policy evaluation by:

  • Using network-informed outcome variables instead of simple returns

  • Measuring directed information flows with transfer entropy

  • Accounting for policy spillover effects through network weights

  • Analyzing crisis contagion with quantile conditioning

  • Providing comprehensive network evolution visualization

Typical Workflow

  1. Define financial market tickers and analysis period

  2. Download financial data and create policy measures

  3. Calculate network weights and transfer entropy matrices

  4. Construct NICI (outcome) and NIPI (treatment) variables

  5. Estimate TE-DiD models with appropriate controls

  6. Visualize network evolution and policy effects

  7. Interpret results for policy recommendations

References

  • Schreiber, T. (2000). Measuring information transfer. Physical Review Letters, 85(2), 461.

  • Angrist, J. D., & Pischke, J. S. (2009). Mostly harmless econometrics: An empiricist's companion. Princeton University Press.

Author

Claude AI claude@anthropic.com

Avisek Banerjee avisek@example.com

Examples

if (FALSE) { # \dontrun{
# Quick start example
library(didTEnets)

# Define markets for analysis
tickers <- c("^GSPC" = "USA", "^FTSE" = "GBR", "^GDAXI" = "DEU")

# Run complete analysis
results <- run_complete_tedid_analysis(
  tickers = tickers,
  start_date = "2019-01-01",
  end_date = "2021-12-31",
  create_plots = TRUE
)

# View main results
summary(results$tedid$main_model)
print(results$summary)

# Access visualizations
if (!is.null(results$plots)) {
  print(results$plots$tedid_plots$timeseries)
}
} # }