Files
Haozhe Wu 36f1698e1f wiki: Chinese alpha notes, and the GTJA 191 post re-measured
Alpha Library: the 191 notes, 117 nicknames and 10 theme tags now switch
to Chinese with the rest of the site. wiki/alpha-library/i18n.zh.json keeps
each translation next to the English it came from; the generator puts the
Chinese in data-text-zh only while that English still matches the
registry, and tests/factors/test_alpha_library_translations.py fails on a
missing, stale or orphaned translation or an unnamed theme.

GTJA 191 post: the 2026-05-17 numbers came from Tushare prices that were
not split-adjusted and from today's CSI 300 roster applied to the whole
window, both fixed on 2026-08-04 (d52199ff). Re-ran the bench on the
current code (point-in-time membership, qfq prices): 8 alive, 14 reversed,
168 dead, gtja191_138 untested (99% NaN), where the first version said
10 / 15 / 165 and never accounted for the 191st. Both languages now carry
a revision note and the new counts, theme table, top 5 by IR and three
most-negative alphas, and fix what the translation surfaced or the code
contradicts: the top 5 are ranked by IR, not IC; the theme table counts
every tag an alpha carries; the reflection matches the table; the Method
universe matches the Caveats; Kakushadze's preprint came a year after the
report; forward returns are simple, not log; no GTJA formula needs sector
tags; the bench measures no turnover and draws no IC plot; five alphas use
a proxy input (named); the reproduce command covers 2018-2025. A new
caveat reports the bench's multiple-testing deflation: 3 of the 8 alive
alphas clear the IR expected from 190 null formulas.
2026-09-29 18:36:52 +08:00

46 lines
1.6 KiB
JavaScript

// Fills the Alpha Library landing stats from content/index.json, which the
// deploy workflow generates (wiki/scripts/build_alpha_library.py).
import { storedLang } from "/site.js?v=20260929e";
const TEXT = {
en: { across: (n) => `across ${n} zoos`, alphas: (n) => `${n} alphas`, missing: "manifest not generated yet" },
zh: { across: (n) => `分布在 ${n} 个因子集`, alphas: (n) => `${n} 个因子`, missing: "尚未生成因子清单" }
};
function render(data) {
const t = TEXT[storedLang()];
const set = (id, value) => {
const el = document.getElementById(id);
if (el) el.textContent = value;
};
if (!data) {
set("stat-total-sub", t.missing);
return;
}
set("stat-total", String(data.total_alphas || 0));
set("stat-total-sub", t.across(data.zoo_count || 0));
set("stat-zoos", String(data.zoo_count || 0));
if (data.generated_at) {
const date = new Date(data.generated_at);
set("stat-generated", Number.isNaN(date.getTime()) ? "--" : date.toISOString().slice(0, 10));
}
for (const zoo of data.zoos || []) {
const el = document.querySelector(`.count[data-zoo="${String(zoo.zoo_id || "")}"]`);
if (el) el.textContent = t.alphas(zoo.count);
}
}
let data = null;
fetch("/alpha-library/content/index.json")
.then((r) => (r.ok ? r.json() : Promise.reject(new Error(String(r.status)))))
.then((json) => {
data = json;
render(data);
})
.catch(() => render(null));
// Re-render the counts in the other language when the reader switches.
document.getElementById("lang-toggle")?.addEventListener("click", () => {
setTimeout(() => render(data), 0);
});