applicate rifiniture in output
This commit is contained in:
@@ -130,7 +130,9 @@ RP_LOOKBACK = 60
|
||||
DAYS_PER_YEAR = 252
|
||||
|
||||
OUT_DIR = Path("./out_stocks_usa")
|
||||
PLOT_DIR = Path("./plot_stocks_usa")
|
||||
OUT_DIR.mkdir(parents=True, exist_ok=True)
|
||||
PLOT_DIR.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
@@ -964,12 +966,15 @@ def main():
|
||||
plt.grid(True)
|
||||
plt.legend()
|
||||
plt.tight_layout()
|
||||
plt.savefig(PLOT_DIR / "equity_line.png", dpi=150)
|
||||
plt.show()
|
||||
|
||||
plot_heatmap_monthly(ret_eq, f"Heatmap mensile – Equal Weight (Top{TOP_N})")
|
||||
plt.savefig(PLOT_DIR / "heatmap_eqw.png", dpi=150)
|
||||
plt.show()
|
||||
|
||||
plot_heatmap_monthly(ret_rp, f"Heatmap mensile – Risk Parity (Top{TOP_N})")
|
||||
plt.savefig(PLOT_DIR / "heatmap_rp.png", dpi=150)
|
||||
plt.show()
|
||||
|
||||
# 6) Save outputs
|
||||
|
||||
Reference in New Issue
Block a user