Hypotheses API¶
asrquant.hypotheses ¶
Hypothesis discovery, search and audit for ASRQuant 1.2.0.
This module turns data, literature, model disagreement and robustness evidence into research candidates. It is intentionally conservative: statistical screening may suggest a useful hypothesis, but it never establishes scientific novelty or causality automatically.
The public entry points are::
asr.hypotheses.from_data(...)
asr.hypotheses.from_literature(...)
asr.hypotheses.from_model_disagreement(...)
asr.hypotheses.from_robustness(...)
asr.hypotheses.discover(...)
asr.hypotheses.search(...)
asr.hypotheses.audit(...)
Every data-driven screen records the number of tests performed, discovery and holdout samples, raw p-values and Benjamini-Hochberg q-values when applicable.
HypothesisIdea
dataclass
¶
One falsifiable research hypothesis with separate evidence and novelty states.
Source code in src/asrquant/hypotheses.py
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | |
start ¶
Hand this hypothesis to ASRQuant's existing end-to-end ResearchProject.
Source code in src/asrquant/hypotheses.py
HypothesisAuditResult
dataclass
¶
Prior-art/evidence audit that never auto-asserts global novelty.
Source code in src/asrquant/hypotheses.py
HypothesisSearchResult
dataclass
¶
Search matches across generated hypotheses and/or supplied literature.
Source code in src/asrquant/hypotheses.py
HypothesisCollection
dataclass
¶
Ranked, searchable hypothesis set with screening provenance.
Source code in src/asrquant/hypotheses.py
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 | |
from_data ¶
from_data(data: DataFrame | Series | Mapping[str, Any], *, domain: str = 'quantitative_finance', targets: str | Sequence[str] | None = None, horizons: Sequence[int] = (1, 5, 20), lags: Sequence[int] = (0, 1, 5), transforms: Mapping[str, str] | None = None, holdout_fraction: float = 0.3, min_observations: int = 80, fdr_alpha: float = 0.05, min_abs_effect: float = 0.08, max_tests: int = 1500, max_candidates: int = 50, include_regime_tests: bool = True, include_cointegration: bool = True, include_structural_scan: bool = True) -> HypothesisCollection
Discover falsifiable hypotheses directly from time-indexed quantitative data.
The function uses a chronological discovery/holdout split and Benjamini-Hochberg correction across the statistical screening family. Returned candidates are still research hypotheses, not established findings.
Source code in src/asrquant/hypotheses.py
888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 | |
from_literature ¶
from_literature(papers: LiteratureCorpus | HypothesisRegistry | str | Path | Sequence[Any], *, topic: str | None = None, max_candidates: int = 50) -> HypothesisCollection
Discover source-linked hypotheses and research gaps from scientific literature.
Source code in src/asrquant/hypotheses.py
from_model_disagreement ¶
from_model_disagreement(predictions: DataFrame | Mapping[str, Sequence[float]], *, domain: str = 'quantitative_finance', max_candidates: int = 25) -> HypothesisCollection
Generate hypotheses from periods where plausible models disagree materially.
Source code in src/asrquant/hypotheses.py
from_robustness ¶
from_robustness(results: DataFrame, *, metric: str, domain: str = 'quantitative_finance', max_candidates: int = 25) -> HypothesisCollection
Generate hypotheses from specification-sensitive research results.
Source code in src/asrquant/hypotheses.py
audit ¶
audit(hypothesis: HypothesisIdea | str, *, corpus: LiteratureCorpus | HypothesisRegistry | str | Path | Sequence[Any] | None = None, topic: str | None = None, top_k: int = 10) -> HypothesisAuditResult
Audit prior art around a hypothesis without asserting global novelty.
Source code in src/asrquant/hypotheses.py
1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 | |
search ¶
search(query: str, *, hypotheses: HypothesisCollection | Sequence[HypothesisIdea] | None = None, papers: LiteratureCorpus | HypothesisRegistry | str | Path | Sequence[Any] | None = None, topic: str | None = None, top_k: int = 10) -> HypothesisSearchResult
Search generated hypotheses and source-linked literature with one query.
Source code in src/asrquant/hypotheses.py
discover ¶
discover(*, data: DataFrame | Series | Mapping[str, Any] | None = None, papers: LiteratureCorpus | HypothesisRegistry | str | Path | Sequence[Any] | None = None, predictions: DataFrame | Mapping[str, Sequence[float]] | None = None, robustness_results: DataFrame | None = None, robustness_metric: str | None = None, domain: str = 'quantitative_finance', max_candidates: int = 50, audit_data_candidates: bool = True, **data_kwargs: Any) -> HypothesisCollection
Combine data-driven and literature-driven hypothesis discovery.
Data evidence and novelty evidence remain separate. When both data and a literature corpus are supplied, data-generated candidates are audited against the supplied corpus; no global novelty claim is made automatically.
Source code in src/asrquant/hypotheses.py
1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 | |