遇见数据集

Export Portfolio Optimization Under Dollarization — Replication Package

收藏
Zenodo2026-07-11 更新2026-08-01 收录
官方服务:

资源简介:

# Replication Package This package contains all code, intermediate data, tables, and figures required toreproduce the results reported in the manuscript *"Export Portfolio OptimizationUnder Dollarization: Volatility Reduction Without Macroeconomic Stabilization —Evidence from Ecuador's Non-Oil Sector."* > **Note on anonymity.** This package is prepared for double-blind peer review.> No file in this package contains author-identifying information. Please do not> add author names, institutional affiliations, or acknowledgments to any file> here until after the review process concludes. --- ## 1. Folder Structure ```replication_package/├── data/ # Raw input data (see Section 2)├── scripts/ # Analysis code, run in numbered order (see Section 3)├── scripts_results/ # Intermediate CSV/TXT outputs generated by the scripts└── tables_figures/ # Final .tex tables and .png figures used in the manuscript``` ## 2. Raw Input Data (`data/`) | File | Content | Source ||---|---|---|| `base fob y tm producto principal.xlsx` | Monthly FOB (USD thousands) and metric tons (TM) by "Producto Principal", Jan 2000–Feb 2026 | Central Bank of Ecuador (BCE) || `Clasificacion productos - macrobloques.xlsx` | Product-to-macro-block classification mapping | Author's classification, refined from BCE categories || `reservas y depositos.xlsx` | Monthly international reserves and demand deposits | BCE || `remesas.xlsx` | Monthly remittances | BCE || `embi.txt` | EMBI country risk spread | J.P. Morgan / BCE || `oil.csv` | WTI oil price | EIA || `fed_rate.csv` | Effective federal funds rate | FRED | **Note on filenames:** some files carry accented characters that may renderinconsistently across operating systems (e.g., "Clasificación" vs."Clasificacion"). Verify exact filenames before running Script 1, or adjust the`read_excel`/`read_csv` paths accordingly. ## 3. Scripts (`scripts/`) — Run in This Order | # | Script | Purpose | Key outputs (→ `scripts_results/`) ||---|---|---|---|| 1 | `script_1_data_fisher.py` | Cleans raw export data, builds Fisher price indices, dual-criterion product selection, macro-block aggregation, bounds validation, cluster analysis, demand elasticities | `retornos_macro_bloques.csv`, `demand_elasticities.csv`, `cluster_validation.csv`, `bounds_empirical_validation.csv`, `fob_by_block.csv`, `product_volatilities_insample.csv`, `markowitz_weights_minvar.csv`, `markowitz_weights_sharpe.csv` || 2 | `Script_2_Macro.R` | Recursive out-of-sample portfolio optimization, bootstrap CIs, sensitivity analysis (Table 8, 10 specifications), short-run HAC models (base and extended), Pesaran bounds test (both specifications), stability tests | `weights_optimal.csv`, `resultados_baseline.csv`, `sensitivity_table8_specs.csv`, `sensitivity_agroindustry_bound.csv`, `sensitivity_alt_blocks.csv`, `resultados_macro_base.csv`, `resultados_macro_extended.csv`, `pesaran_trivariate_results.csv`, `uecm_global_results.csv`, `stability_tests.csv`, `weights_bootstrap_ci.csv`, `portfolio_performance.csv`, `policy_gap_monthly.csv`, `unit_root_tests.csv` || 3 | `script_3_figures.py` | Generates main figures (data overview, portfolio results, macro analysis, delta activation, bootstrap weights, stability, policy gap) | `figure1_data_overview.png` … `figure7_policy_gap.png` || 4 | `script_4_products.py` | Product-level figures (Agroindustry volatility, Sharpe scatter) | `figure_agro_volatility.png`, `figure_sharpe_scatter.png` || 5 | `script_5_latex_tables.py` | Assembles all `.tex` tables in `tables_figures/` from the CSVs above | All `table_*.tex` files | **Important:** the scripts contain hardcoded `/content/...` paths (Google Colabconvention). Before running locally, replace these with the appropriate relativepaths to the `data/` and `scripts_results/` folders. **Note on Table 8 generation:** `table_sensitivity_table8.tex` in this packageis the corrected version. An earlier version of this file contained anunescaped `%` character in two specification labels ("Manufacturing min.weight = 10%" and "Agroindustry empirical bound (15%, vs. 40% normative)"),which caused LaTeX to silently truncate those two rows when compiled (a `%`outside a math environment is a LaTeX comment character in TeX). This has beenfixed at the source: `script_5_latex_tables.py` now escapes any literal `%`in the `Specification` column before writing the `.tex` file, so regeneratingthis table from the scripts in this package will not reproduce the issue. ## 4. Mapping: Manuscript Tables/Figures → Files | Manuscript | File in `tables_figures/` ||---|---|| Table 1 | `table_cluster_validation.tex` || Table 2 | `table_bounds_validation.tex` || Table 3 | `table_elasticities.tex` || Table 4 | `table_descriptives.tex` || Table 5 | `table_correlation.tex` || Table 6 | `table_weights.tex` || Table 7 | `table_performance.tex` || Table 8 | `table_sensitivity_table8.tex` (see note on Table 8 generation in Section 3) || Table 9 | `table_pesaran.tex` || Table 10 | `table_macro_extended.tex` || Table 11 (App. A.1) | `table_shrunk_correlations.tex` || Table 12 (App. A.2) | `table_unit_root.tex` || Table 13 (App. A.3) | `table_bounds_distribution.tex` || Table 14 (App. A.4) | product composition — see `table_agriculture.tex`, `table_agro.tex`, `table_marine.tex`, `table_manufacturing.tex`, `table_flowers.tex`, `table_minerals.tex` || Table 15 (App. A.4) | `table_sensitivity_alt_blocks.tex` || Table 16 (App. B) | `table_macro_base.tex` || Table 17 (App. C) | derived from `product_volatilities_insample.csv` (product count by block) || Table 18 (App. E) | robustness summary — derived from `resultados_macro_base.csv`, `resultados_macro_extended.csv`, `stability_tests.csv`, `vif_results.csv` || Table 19 (App. F) | `block_correlation_validation.csv`, `block_correlation_permutation_test.txt` || Figure 1 | `figure4_delta_activation.png` || Figure 2 | `figure1_data_overview.png` || Figure 3 | `figure2_portfolio.png` || Figure 4 | `figure7_policy_gap.png` || Figure 5 | `figure3_macro_extended.png` || Figure 6 | `figure6_stability_tests.png` || Figure 7 | `figure_agro_volatility.png` || Figure 8 | `figure_sharpe_scatter.png` | Note the figure numbering in this table follows the manuscript's finalcompiled order, which does **not** match the numeric suffix in the file names(e.g., manuscript Figure 2 is generated from `figure1_data_overview.png`). Thisis a naming-legacy artifact from the generation scripts, not an error. ## 5. Additional Diagnostic Outputs (Not Directly Tabulated in the Manuscript) The following files in `scripts_results/` support robustness claims made in thetext but are not reproduced as standalone tables: `power_analysis.csv`,`vif_results.csv`, `risk_free_robustness.csv`, `shrinkage_vs_pure_comparison.csv`,`fisher_vs_unitvalue_comparison.csv`, `structural_break_tests.csv`,`delta_empirico.txt`. Reviewers seeking the exact source of a specificrobustness claim in the text should consult these files directly. ## 6. Software Requirements - **Python 3.12**: `pandas`, `numpy`, `scipy`, `matplotlib`, `seaborn`- **R 4.4**: `corpcor`, `readr`, plus packages for CUSUM/Chow/Zivot-Andrews/ Bai-Perron tests as used in `Script_2_Macro.R` > **Note:** the manuscript states that a `requirements.txt` and `renv.lock` are> provided for exact dependency versions. These files are not yet included in> this package version; they should be generated and added before final> submission to ensure exact reproducibility of package versions. ## 7. Reproducibility Notes - In-sample period: 2013–2019. Out-of-sample evaluation: 2020–2026.- All random processes (bootstrap confidence intervals, permutation tests) use fixed seeds, set within the respective scripts.- Fisher price indices are anchored at base year 2010.- The turnover friction parameter δ = 0.00844 is derived empirically in Script 2 (median absolute monthly share change, 2013–2019), not hardcoded. ## 8. Contact For questions about this replication package during the review process, pleaseroute correspondence through the journal's editorial system rather thandirectly to the author, to preserve the integrity of the double-blind process.

提供机构:
Zenodo
创建时间:
2026-07-11
二维码
社区交流群
二维码
科研交流群
商业服务