aether_quant.hello¶
The hello world as a library call (V6.6.5): what aq hello does, for a notebook or a script.
The hello world as a library call (V6.6.5): what aq hello does, for a notebook or a script.
from aether_quant import hello report = hello.run(offline=True) # the bundled sample; offline=False downloads from Coinbase's public candles print(hello.render_text(report)) report.equity.plot() # the shipped rule's equity curve (needs matplotlib)
HELLO_RULE
module-attribute
¶
HELLO_RULE: dict[str, object] = {'id': 't3_crypto_trend_blend_x_eos', 'kind': 'time_series', 'family': 'crypto_trend', 'universe': ['crypto'], 'rebalance_every': 5, 'params': {'lookback_a': 20, 'lookback_b': 60, 'lookback_c': 120}}
HelloReport
dataclass
¶
Everything aq hello prints, plus the equity curves.
StatsRow
dataclass
¶
One column of the report.
known_at_sessions ¶
known_at_sessions(closes: DataFrame, sessions: list[str]) -> pd.DataFrame
Closes known on each session: the bar dated before it (a crypto bar dated D closes at the midnight after D).
load_closes ¶
load_closes(*, offline: bool = False, start: str = '2022-01-01', end: str | None = None, cache_dir: Path | None = None, get_json: Callable[[str], object] | None = None) -> tuple[pd.DataFrame, str, str | None]
(closes, source, notice). Downloads the 11 coins from Coinbase's public candles (about 6 months before start,
for the 120-session lookback) unless offline; any failure falls back to the bundled sample, with a one-line notice.
render_html ¶
render_html(report: HelloReport) -> str
A self-contained page: the table, the checks and the equity curve against BTC (no scripts, no external files).
rule_weights ¶
rule_weights(closes: DataFrame, *, start: str, end: str, params: dict[str, float] | None = None, rebalance_every: int | None = None) -> pd.DataFrame
The rule's decisions as a calendar dates x coins frame (rows without a decision are NaN), from start to end.
run ¶
run(offline: bool = False, *, start: str = '2022-01-01', end: str | None = None, cache: bool = True) -> HelloReport
Load the data (download unless offline, falling back to the sample) and run the whole demo.
run_hello ¶
run_hello(closes: DataFrame, *, start: str = '2022-01-01', end: str | None = None, data_source: str = 'sample') -> HelloReport
The whole demo on a calendar dates x coins frame of closes (needs ~6 months of history before start).
save ¶
save(report: HelloReport, *, html_path: str | Path | None = None, json_path: str | Path | None = None) -> None
Write the HTML page and/or the JSON report.