axiolune 0.6.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (752) hide show
  1. axiolune/ALLOCATION-SPECS.md +84 -0
  2. axiolune/BROKER-PORT.md +71 -0
  3. axiolune/COMPANY_RESEARCH.md +130 -0
  4. axiolune/DATA-READINESS.md +84 -0
  5. axiolune/DOCUMENTS.md +190 -0
  6. axiolune/ECB-EST.md +30 -0
  7. axiolune/FACTOR-PAIRS.md +256 -0
  8. axiolune/FETCH-BUDGETS.md +93 -0
  9. axiolune/FILE-IMPORTS.md +92 -0
  10. axiolune/FINANCIAL-QUERIES.md +105 -0
  11. axiolune/FINANCIAL-RATIOS.md +115 -0
  12. axiolune/FINANCIALS.md +206 -0
  13. axiolune/IDENTITY-OBSERVATIONS.md +164 -0
  14. axiolune/LEDGER-ADMISSION.md +89 -0
  15. axiolune/LEDGER-INTERFACES.md +112 -0
  16. axiolune/MAPPINGS.md +271 -0
  17. axiolune/MARKET-CALENDAR.md +68 -0
  18. axiolune/ML-RESEARCH.md +83 -0
  19. axiolune/OBSERVATION-LABELS.md +177 -0
  20. axiolune/PAPER-MATCHING.md +93 -0
  21. axiolune/PDF-READING.md +167 -0
  22. axiolune/PERFORMANCE.md +64 -0
  23. axiolune/PUBLIC-ARCHIVE.md +73 -0
  24. axiolune/QUERY-SPECS.md +126 -0
  25. axiolune/REPORT-DISCLOSURES.md +208 -0
  26. axiolune/RESEARCH_BUNDLES.md +128 -0
  27. axiolune/SEC-FINANCIALS.md +118 -0
  28. axiolune/SHARED-LEDGER.md +130 -0
  29. axiolune/SOURCE-FINANCIAL-BINDINGS.md +114 -0
  30. axiolune/SOURCE-HEALTH.md +190 -0
  31. axiolune/SOURCE-SCHEDULING.md +302 -0
  32. axiolune/SQLITE-RECOVERY.md +36 -0
  33. axiolune/STREAMING.md +185 -0
  34. axiolune/TARGET-ORDERS.md +211 -0
  35. axiolune/TEAM-EXTENSIONS.md +42 -0
  36. axiolune/TEAM-REGISTRY.md +75 -0
  37. axiolune/TEAM-REQUEST-LIMITS.md +53 -0
  38. axiolune/TEAM-SOURCES.md +110 -0
  39. axiolune/TEMPORAL.md +75 -0
  40. axiolune/TENCENT-DAILY.md +73 -0
  41. axiolune/TIME-SPLITS.md +319 -0
  42. axiolune/TWSE-STATE-SOURCES.md +39 -0
  43. axiolune/TYPED-FRAMES.md +392 -0
  44. axiolune/__init__.py +91 -0
  45. axiolune/__main__.py +3 -0
  46. axiolune/_bundled/licenses/axiolune-connectors/LICENSE +201 -0
  47. axiolune/_bundled/licenses/axiolune-connectors/NOTICE +9 -0
  48. axiolune/_bundled/licenses/axiolune-connectors/RUNTIME-REFERENCE-NOTICE.md +22 -0
  49. axiolune/_bundled/licenses/axiolune-connectors/THIRD_PARTY_NOTICES.md +35 -0
  50. axiolune/_bundled/licenses/axiolune-contracts/LICENSE +201 -0
  51. axiolune/_bundled/licenses/axiolune-contracts/NOTICE +9 -0
  52. axiolune/_bundled/licenses/axiolune-contracts/THIRD_PARTY_NOTICES.md +35 -0
  53. axiolune/_bundled/licenses/axiolune-research-engine/LICENSE +201 -0
  54. axiolune/_bundled/licenses/axiolune-semantic-runtime/LICENSE +201 -0
  55. axiolune/_bundled/licenses/axiolune-semantic-runtime/NOTICE +9 -0
  56. axiolune/_bundled/licenses/axiolune-semantic-runtime/THIRD_PARTY_NOTICES.md +35 -0
  57. axiolune/_errors.py +34 -0
  58. axiolune/_service_data.py +347 -0
  59. axiolune/_service_quality.py +141 -0
  60. axiolune/_symbols.py +42 -0
  61. axiolune/_version.py +16 -0
  62. axiolune/_wave.py +16 -0
  63. axiolune/acquisition_jobs.py +814 -0
  64. axiolune/adapter_factory.py +342 -0
  65. axiolune/adapters/data_wire.py +55 -0
  66. axiolune/adapters/server/__init__.py +5 -0
  67. axiolune/adapters/server/__main__.py +32 -0
  68. axiolune/adapters/server/app.py +211 -0
  69. axiolune/adapters/team_data.py +136 -0
  70. axiolune/adapters/workers/__init__.py +1 -0
  71. axiolune/adapters/workers/__main__.py +151 -0
  72. axiolune/adapters/workers/fleet.py +57 -0
  73. axiolune/adapters/workers/query.py +84 -0
  74. axiolune/adapters/workers/sources.py +96 -0
  75. axiolune/allocations.py +353 -0
  76. axiolune/alternative_research.py +94 -0
  77. axiolune/analysis/__init__.py +64 -0
  78. axiolune/analysis/base.py +165 -0
  79. axiolune/analysis/commercial.py +27 -0
  80. axiolune/analysis/exposure.py +153 -0
  81. axiolune/analysis/onepager.py +87 -0
  82. axiolune/analysis/performance.py +187 -0
  83. axiolune/analysis/pit.py +208 -0
  84. axiolune/analysis/trades.py +185 -0
  85. axiolune/arrow_interchange.py +350 -0
  86. axiolune/async_session.py +448 -0
  87. axiolune/backtest/__init__.py +12 -0
  88. axiolune/backtest/adapter.py +113 -0
  89. axiolune/backtest/config.py +205 -0
  90. axiolune/backtest/execution.py +447 -0
  91. axiolune/backtest/presentation.py +182 -0
  92. axiolune/backtest/research.py +209 -0
  93. axiolune/backtest/schedule.py +33 -0
  94. axiolune/backtest/sim.py +5 -0
  95. axiolune/backtest/strategy.py +23 -0
  96. axiolune/broker.py +137 -0
  97. axiolune/budgets.py +33 -0
  98. axiolune/catalog/__init__.py +3 -0
  99. axiolune/catalog/api.py +126 -0
  100. axiolune/catalog/surface.json +71620 -0
  101. axiolune/catalog/surface.py +180 -0
  102. axiolune/cli.py +941 -0
  103. axiolune/company_research.py +668 -0
  104. axiolune/contracts/__init__.py +6 -0
  105. axiolune/contracts/public_http.py +50 -0
  106. axiolune/contracts/query.py +75 -0
  107. axiolune/contracts/source.py +233 -0
  108. axiolune/corporate_actions.py +208 -0
  109. axiolune/cross_section.py +198 -0
  110. axiolune/data/__init__.py +12 -0
  111. axiolune/data/api.py +259 -0
  112. axiolune/data/result.py +46 -0
  113. axiolune/data/source.py +790 -0
  114. axiolune/data_readiness.py +273 -0
  115. axiolune/dataframe/__init__.py +11 -0
  116. axiolune/dataframe/alignment.py +129 -0
  117. axiolune/dataframe/cross_section.py +63 -0
  118. axiolune/dataframe/frame.py +241 -0
  119. axiolune/dataframe/grouping.py +109 -0
  120. axiolune/dataframe/index_dates.py +85 -0
  121. axiolune/dataframe/lazy.py +257 -0
  122. axiolune/dataframe/panel.py +80 -0
  123. axiolune/dataframe/selection.py +117 -0
  124. axiolune/dataframe/weighting.py +238 -0
  125. axiolune/derivatives_research.py +130 -0
  126. axiolune/dictionary_index.py +82 -0
  127. axiolune/dictionary_methods.py +244 -0
  128. axiolune/dictionary_statistics.py +325 -0
  129. axiolune/documents.py +637 -0
  130. axiolune/environment.py +36 -0
  131. axiolune/errors.py +23 -0
  132. axiolune/factor_diagnostics.py +157 -0
  133. axiolune/factors.py +511 -0
  134. axiolune/file_io.py +215 -0
  135. axiolune/financials.py +414 -0
  136. axiolune/future_labels.py +272 -0
  137. axiolune/futures_bar.py +272 -0
  138. axiolune/identity.py +359 -0
  139. axiolune/indicators.py +323 -0
  140. axiolune/journey.py +299 -0
  141. axiolune/knowledge.py +119 -0
  142. axiolune/labels.py +420 -0
  143. axiolune/ledger.py +822 -0
  144. axiolune/ledger_admission.py +311 -0
  145. axiolune/ledger_corporate_actions.py +248 -0
  146. axiolune/ledger_futures.py +299 -0
  147. axiolune/ledger_store.py +774 -0
  148. axiolune/mapping.py +789 -0
  149. axiolune/market/__init__.py +87 -0
  150. axiolune/market/spec.py +195 -0
  151. axiolune/market_calendar.py +670 -0
  152. axiolune/market_lifecycle.py +344 -0
  153. axiolune/ml/__init__.py +37 -0
  154. axiolune/ml/_panel.py +80 -0
  155. axiolune/ml/cli.py +66 -0
  156. axiolune/ml/drift.py +170 -0
  157. axiolune/ml/estimators.py +232 -0
  158. axiolune/ml/feature.py +202 -0
  159. axiolune/ml/feature_sampling.py +123 -0
  160. axiolune/ml/inference.py +242 -0
  161. axiolune/ml/labeling.py +75 -0
  162. axiolune/ml/linear.py +88 -0
  163. axiolune/ml/prediction_batches.py +109 -0
  164. axiolune/ml/research.py +453 -0
  165. axiolune/ml/select.py +14 -0
  166. axiolune/ml/ticket.py +172 -0
  167. axiolune/ml/trees.py +14 -0
  168. axiolune/ml/trials.py +95 -0
  169. axiolune/multi_asset.py +840 -0
  170. axiolune/object_references.py +38 -0
  171. axiolune/online/__init__.py +136 -0
  172. axiolune/open_alternatives.py +310 -0
  173. axiolune/open_research.py +291 -0
  174. axiolune/open_risk.py +134 -0
  175. axiolune/optimization.py +590 -0
  176. axiolune/optimize/__init__.py +4 -0
  177. axiolune/optimize/combinations.py +274 -0
  178. axiolune/paper_matching.py +632 -0
  179. axiolune/pdf_reading.py +289 -0
  180. axiolune/pdf_refinement.py +376 -0
  181. axiolune/performance.py +569 -0
  182. axiolune/plot/__init__.py +6 -0
  183. axiolune/plot/charts.py +227 -0
  184. axiolune/plot/strategies.py +140 -0
  185. axiolune/plugins.py +95 -0
  186. axiolune/portfolio/__init__.py +16 -0
  187. axiolune/portfolio/execution.py +10 -0
  188. axiolune/portfolio/model.py +124 -0
  189. axiolune/portfolio/performance.py +176 -0
  190. axiolune/portfolio/research.py +330 -0
  191. axiolune/portfolio/sync.py +238 -0
  192. axiolune/products/__init__.py +3 -0
  193. axiolune/products/registry.py +405 -0
  194. axiolune/py.typed +0 -0
  195. axiolune/qhkc_research.py +99 -0
  196. axiolune/recovery.py +274 -0
  197. axiolune/remote.py +175 -0
  198. axiolune/report/__init__.py +21 -0
  199. axiolune/report/html.py +108 -0
  200. axiolune/report/model.py +211 -0
  201. axiolune/report/service.py +24 -0
  202. axiolune/report/shape.py +126 -0
  203. axiolune/report_disclosure.py +439 -0
  204. axiolune/research_bundle.py +448 -0
  205. axiolune/research_package.py +298 -0
  206. axiolune/resources/alternative-bindings.json +1245 -0
  207. axiolune/resources/alternative-methods.json +82 -0
  208. axiolune/resources/bond-fx-bindings.json +4755 -0
  209. axiolune/resources/bond-fx-products.json +5034 -0
  210. axiolune/resources/chinascope-intermediate.pem +32 -0
  211. axiolune/resources/company-research-request.json +78 -0
  212. axiolune/resources/derivatives-bindings.json +1999 -0
  213. axiolune/resources/derivatives-exchange-vocabulary.json +256 -0
  214. axiolune/resources/derivatives-views.json +4182 -0
  215. axiolune/resources/dictionary-methods.json.gz +0 -0
  216. axiolune/resources/economic-bindings.json +17465 -0
  217. axiolune/resources/equity-cninfo-fields.json +360 -0
  218. axiolune/resources/equity-original-selectors.json +8018 -0
  219. axiolune/resources/equity-products.json +13341 -0
  220. axiolune/resources/equity-protocol-reference-LICENSE.txt +21 -0
  221. axiolune/resources/exchange-bindings.json +1667 -0
  222. axiolune/resources/forbes-intermediate.pem +29 -0
  223. axiolune/resources/fund-bindings.json +8478 -0
  224. axiolune/resources/index-bindings.json +6415 -0
  225. axiolune/resources/interface-reference.json +114693 -0
  226. axiolune/resources/licenses/AKShare-MIT.txt +21 -0
  227. axiolune/resources/market-alternative-contracts.json +535 -0
  228. axiolune/resources/misc-bindings.json +2233 -0
  229. axiolune/resources/misc-products.json +3948 -0
  230. axiolune/resources/ml-research-request.json +214 -0
  231. axiolune/resources/occurrence-products.json +1 -0
  232. axiolune/resources/open-alternatives-index.json.gz +0 -0
  233. axiolune/resources/open-alternatives.json +43 -0
  234. axiolune/resources/open-field-bindings.json.gz +0 -0
  235. axiolune/resources/public-parameter-contracts.json +9783 -0
  236. axiolune/resources/qhkc-public-methods.json +7958 -0
  237. axiolune/resources/security-directory.json.gz +0 -0
  238. axiolune/resources/semantic-bundle.json +1 -0
  239. axiolune/resources/service-catalog.json +4097 -0
  240. axiolune/resources/source-catalog-display.json +6792 -0
  241. axiolune/resources/source-products.json +8869 -0
  242. axiolune/resources/stock-feature-bindings.json +31431 -0
  243. axiolune/resources/stock-feature-products.json +3040 -0
  244. axiolune/resources/sws-intermediate.pem +33 -0
  245. axiolune/risk.py +557 -0
  246. axiolune/securities.py +392 -0
  247. axiolune/semantics.py +43 -0
  248. axiolune/services.py +196 -0
  249. axiolune/session.py +840 -0
  250. axiolune/source_bindings.py +108 -0
  251. axiolune/source_bundle.py +304 -0
  252. axiolune/source_catalog.py +198 -0
  253. axiolune/source_financials.py +433 -0
  254. axiolune/source_frames.py +139 -0
  255. axiolune/source_health.py +472 -0
  256. axiolune/source_policy.py +150 -0
  257. axiolune/source_request.py +157 -0
  258. axiolune/sources/__init__.py +1 -0
  259. axiolune/sources/air_history.py +367 -0
  260. axiolune/sources/air_observations.py +358 -0
  261. axiolune/sources/alternative_bindings.py +595 -0
  262. axiolune/sources/alternative_market_research.py +34 -0
  263. axiolune/sources/alternative_products.py +239 -0
  264. axiolune/sources/bls_files.py +96 -0
  265. axiolune/sources/bls_republication.py +128 -0
  266. axiolune/sources/bond_fx.py +67 -0
  267. axiolune/sources/bond_fx_bindings.py +584 -0
  268. axiolune/sources/bond_fx_original.py +149 -0
  269. axiolune/sources/bond_market_alternatives.py +196 -0
  270. axiolune/sources/carbon_current.py +80 -0
  271. axiolune/sources/carbon_public.py +109 -0
  272. axiolune/sources/carbon_reports.py +173 -0
  273. axiolune/sources/cfa_delivery_pairing.py +85 -0
  274. axiolune/sources/cffex_history.py +43 -0
  275. axiolune/sources/chinamoney.py +218 -0
  276. axiolune/sources/chinamoney_english.py +82 -0
  277. axiolune/sources/chinamoney_market_public.py +94 -0
  278. axiolune/sources/cni_announcements.py +367 -0
  279. axiolune/sources/cninfo_client.py +25 -0
  280. axiolune/sources/commodity_history.py +91 -0
  281. axiolune/sources/commodity_market_public.py +138 -0
  282. axiolune/sources/corporate_markets.py +247 -0
  283. axiolune/sources/crypto_reports.py +154 -0
  284. axiolune/sources/csi_materials.py +91 -0
  285. axiolune/sources/currency_original.py +82 -0
  286. axiolune/sources/dbnomics.py +242 -0
  287. axiolune/sources/derivatives_bindings.py +471 -0
  288. axiolune/sources/derivatives_calculations.py +112 -0
  289. axiolune/sources/derivatives_delivery_public.py +88 -0
  290. axiolune/sources/derivatives_efp_public.py +50 -0
  291. axiolune/sources/derivatives_exchange.py +373 -0
  292. axiolune/sources/derivatives_hog.py +50 -0
  293. axiolune/sources/derivatives_market_alternatives.py +57 -0
  294. axiolune/sources/derivatives_options.py +137 -0
  295. axiolune/sources/derivatives_original.py +135 -0
  296. axiolune/sources/derivatives_products.py +295 -0
  297. axiolune/sources/derivatives_public.py +70 -0
  298. axiolune/sources/derivatives_settlement.py +66 -0
  299. axiolune/sources/derivatives_sina.py +157 -0
  300. axiolune/sources/derivatives_views.py +441 -0
  301. axiolune/sources/economic_bindings.py +264 -0
  302. axiolune/sources/economic_history.py +147 -0
  303. axiolune/sources/equity_ab_comparison.py +103 -0
  304. axiolune/sources/equity_auction.py +78 -0
  305. axiolune/sources/equity_board_calculations.py +62 -0
  306. axiolune/sources/equity_boards.py +79 -0
  307. axiolune/sources/equity_business_alternatives.py +127 -0
  308. axiolune/sources/equity_connect_alternatives.py +76 -0
  309. axiolune/sources/equity_history.py +836 -0
  310. axiolune/sources/equity_hkex_directory.py +76 -0
  311. axiolune/sources/equity_holder_disclosures.py +68 -0
  312. axiolune/sources/equity_html_views.py +227 -0
  313. axiolune/sources/equity_minute_alternatives.py +86 -0
  314. axiolune/sources/equity_neeq_delisted.py +75 -0
  315. axiolune/sources/equity_original.py +1035 -0
  316. axiolune/sources/equity_otc_quotes.py +251 -0
  317. axiolune/sources/equity_public_alternatives.py +327 -0
  318. axiolune/sources/equity_rank_alternatives.py +96 -0
  319. axiolune/sources/equity_screening.py +51 -0
  320. axiolune/sources/equity_sina_constituents.py +78 -0
  321. axiolune/sources/equity_social_alternatives.py +134 -0
  322. axiolune/sources/equity_szse.py +57 -0
  323. axiolune/sources/equity_ths_constituents.py +85 -0
  324. axiolune/sources/equity_ths_ipo.py +67 -0
  325. axiolune/sources/equity_trade_imbalance.py +127 -0
  326. axiolune/sources/equity_us_directory.py +73 -0
  327. axiolune/sources/equity_xueqiu.py +39 -0
  328. axiolune/sources/exchange_bindings.py +232 -0
  329. axiolune/sources/exchange_public_alternatives.py +248 -0
  330. axiolune/sources/exchange_recovery.py +337 -0
  331. axiolune/sources/exchange_report_tables.py +70 -0
  332. axiolune/sources/exchange_views.py +167 -0
  333. axiolune/sources/fortune.py +128 -0
  334. axiolune/sources/fund_bindings.py +268 -0
  335. axiolune/sources/fund_extract.py +203 -0
  336. axiolune/sources/fund_history.py +138 -0
  337. axiolune/sources/fund_market_alternatives.py +148 -0
  338. axiolune/sources/fund_original.py +295 -0
  339. axiolune/sources/fund_portfolios.py +24 -0
  340. axiolune/sources/fund_products.py +436 -0
  341. axiolune/sources/fund_public_alternatives.py +197 -0
  342. axiolune/sources/fund_reit_snapshot.py +68 -0
  343. axiolune/sources/fund_views.py +155 -0
  344. axiolune/sources/fx168_client.py +37 -0
  345. axiolune/sources/fx_public.py +155 -0
  346. axiolune/sources/global_markets.py +268 -0
  347. axiolune/sources/index_bindings.py +441 -0
  348. axiolune/sources/index_global_snapshot.py +71 -0
  349. axiolune/sources/index_market_alternatives.py +99 -0
  350. axiolune/sources/index_original.py +105 -0
  351. axiolune/sources/index_products.py +265 -0
  352. axiolune/sources/index_public_research.py +55 -0
  353. axiolune/sources/index_reports.py +37 -0
  354. axiolune/sources/issuer_disclosures.py +149 -0
  355. axiolune/sources/jin10_history.py +99 -0
  356. axiolune/sources/legulegu_client.py +69 -0
  357. axiolune/sources/legulegu_industry.py +82 -0
  358. axiolune/sources/literals.py +97 -0
  359. axiolune/sources/macro_history.py +36 -0
  360. axiolune/sources/market_disclosures.py +188 -0
  361. axiolune/sources/misc_actions_public.py +43 -0
  362. axiolune/sources/misc_bindings.py +633 -0
  363. axiolune/sources/misc_news_public.py +72 -0
  364. axiolune/sources/misc_products.py +118 -0
  365. axiolune/sources/nafmii_client.py +18 -0
  366. axiolune/sources/nafmii_notices.py +181 -0
  367. axiolune/sources/native_html.py +113 -0
  368. axiolune/sources/nbs_history.py +184 -0
  369. axiolune/sources/network_routes.py +121 -0
  370. axiolune/sources/occurrence_products.py +6 -0
  371. axiolune/sources/openapi.py +129 -0
  372. axiolune/sources/option_public.py +251 -0
  373. axiolune/sources/oxford_history.py +253 -0
  374. axiolune/sources/pbc_credit.py +91 -0
  375. axiolune/sources/pdf_tables.py +73 -0
  376. axiolune/sources/projections.py +155 -0
  377. axiolune/sources/public_archive.py +467 -0
  378. axiolune/sources/public_files.py +111 -0
  379. axiolune/sources/public_parameters.py +42 -0
  380. axiolune/sources/public_statistics.py +274 -0
  381. axiolune/sources/qhkc.py +186 -0
  382. axiolune/sources/qhkc_public.py +298 -0
  383. axiolune/sources/qhkc_research.py +369 -0
  384. axiolune/sources/qihuo9_client.py +26 -0
  385. axiolune/sources/sec.py +181 -0
  386. axiolune/sources/shfe_history.py +98 -0
  387. axiolune/sources/shfe_weekly.py +74 -0
  388. axiolune/sources/sina_codec.py +258 -0
  389. axiolune/sources/soozhu_session.py +124 -0
  390. axiolune/sources/sql.py +184 -0
  391. axiolune/sources/stock_feature.py +732 -0
  392. axiolune/sources/stock_feature_esg.py +220 -0
  393. axiolune/sources/stock_feature_events.py +31 -0
  394. axiolune/sources/stock_feature_html.py +292 -0
  395. axiolune/sources/stock_feature_lhb.py +67 -0
  396. axiolune/sources/stock_feature_metrics.py +104 -0
  397. axiolune/sources/stock_feature_survey.py +60 -0
  398. axiolune/sources/szets_quotes.py +97 -0
  399. axiolune/sources/tanjiaoyi_client.py +23 -0
  400. axiolune/sources/taxonomy.py +52 -0
  401. axiolune/sources/tencent.py +160 -0
  402. axiolune/sources/tencent_wire.py +107 -0
  403. axiolune/sources/treasury.py +73 -0
  404. axiolune/sources/wealth_public.py +72 -0
  405. axiolune/sources/wealth_rank.py +87 -0
  406. axiolune/sources/xlsx.py +76 -0
  407. axiolune/sqlite_connections.py +94 -0
  408. axiolune/storage.py +323 -0
  409. axiolune/storage_activity.py +115 -0
  410. axiolune/storage_capacity.py +107 -0
  411. axiolune/storage_maintenance.py +496 -0
  412. axiolune/store/__init__.py +4 -0
  413. axiolune/store/paths.py +23 -0
  414. axiolune/store/warehouse.py +84 -0
  415. axiolune/stream_state.py +201 -0
  416. axiolune/streaming.py +542 -0
  417. axiolune/talib_backend.py +313 -0
  418. axiolune/target_orders.py +637 -0
  419. axiolune/team/OPERATIONS.md +346 -0
  420. axiolune/team/README.md +59 -0
  421. axiolune/team/__init__.py +12 -0
  422. axiolune/team/__main__.py +189 -0
  423. axiolune/team/artifact_content.py +80 -0
  424. axiolune/team/auth.py +89 -0
  425. axiolune/team/client.py +102 -0
  426. axiolune/team/collaboration.py +594 -0
  427. axiolune/team/config.py +50 -0
  428. axiolune/team/deployment.py +121 -0
  429. axiolune/team/extensions.py +134 -0
  430. axiolune/team/lifecycle.py +125 -0
  431. axiolune/team/observability.py +144 -0
  432. axiolune/team/operations.py +25 -0
  433. axiolune/team/operations_control.py +240 -0
  434. axiolune/team/portfolio_plans.py +449 -0
  435. axiolune/team/recovery.py +698 -0
  436. axiolune/team/registry.py +318 -0
  437. axiolune/team/reporting.py +464 -0
  438. axiolune/team/request_admission.py +112 -0
  439. axiolune/team/schema.py +183 -0
  440. axiolune/team/source_jobs.py +665 -0
  441. axiolune/team/source_scheduling.py +1193 -0
  442. axiolune/team/store.py +1272 -0
  443. axiolune/temporal.py +361 -0
  444. axiolune/ticker.py +45 -0
  445. axiolune/time_splits.py +812 -0
  446. axiolune/tools/__init__.py +21 -0
  447. axiolune/tools/cohorts.py +147 -0
  448. axiolune/tools/events.py +86 -0
  449. axiolune/tools/explanation.py +118 -0
  450. axiolune/tools/factor.py +162 -0
  451. axiolune/tools/returns.py +141 -0
  452. axiolune/tools/trend.py +75 -0
  453. axiolune/transport.py +679 -0
  454. axiolune/typed_frame.py +1055 -0
  455. axiolune/universe/__init__.py +3 -0
  456. axiolune/universe/api.py +28 -0
  457. axiolune/user_workflows.py +137 -0
  458. axiolune/value_codec.py +84 -0
  459. axiolune/wire.py +42 -0
  460. axiolune/workflow_cli.py +242 -0
  461. axiolune-0.6.0.dist-info/METADATA +319 -0
  462. axiolune-0.6.0.dist-info/RECORD +752 -0
  463. axiolune-0.6.0.dist-info/WHEEL +4 -0
  464. axiolune-0.6.0.dist-info/entry_points.txt +6 -0
  465. axiolune-0.6.0.dist-info/licenses/NOTICE +9 -0
  466. axiolune-0.6.0.dist-info/licenses/THIRD_PARTY_NOTICES.md +89 -0
  467. axiolune_connectors/FINANCIAL-STATEMENT-FIELDS.md +32 -0
  468. axiolune_connectors/__init__.py +263 -0
  469. axiolune_connectors/_version.py +16 -0
  470. axiolune_connectors/base.py +53 -0
  471. axiolune_connectors/benchmarks.py +100 -0
  472. axiolune_connectors/fundamental_fields.py +332 -0
  473. axiolune_connectors/licensed_http.py +117 -0
  474. axiolune_connectors/local_dataset.py +145 -0
  475. axiolune_connectors/local_manifest.py +47 -0
  476. axiolune_connectors/product_shortname_mappings.py +797 -0
  477. axiolune_connectors/public_a_share.py +3814 -0
  478. axiolune_connectors/public_sources/__init__.py +793 -0
  479. axiolune_connectors/public_sources/_all_tables_human_entry.py +11 -0
  480. axiolune_connectors/public_sources/_universe_incr_cache.py +8 -0
  481. axiolune_connectors/public_sources/activity_dictionary_bindings.py +215 -0
  482. axiolune_connectors/public_sources/ads_factordata_002_native.py +793 -0
  483. axiolune_connectors/public_sources/ads_fundamental_factor_completion.py +923 -0
  484. axiolune_connectors/public_sources/ads_fundamental_factor_repository_adapter.py +62 -0
  485. axiolune_connectors/public_sources/all_tables_001_public.py +780 -0
  486. axiolune_connectors/public_sources/all_tables_002_public.py +633 -0
  487. axiolune_connectors/public_sources/all_tables_003_public.py +594 -0
  488. axiolune_connectors/public_sources/all_tables_004_public.py +561 -0
  489. axiolune_connectors/public_sources/all_tables_005_public.py +558 -0
  490. axiolune_connectors/public_sources/all_tables_006_public.py +597 -0
  491. axiolune_connectors/public_sources/all_tables_007_public.py +762 -0
  492. axiolune_connectors/public_sources/all_tables_008_public.py +564 -0
  493. axiolune_connectors/public_sources/all_tables_009_public.py +648 -0
  494. axiolune_connectors/public_sources/all_tables_010_public.py +750 -0
  495. axiolune_connectors/public_sources/all_tables_011_public.py +611 -0
  496. axiolune_connectors/public_sources/all_tables_012_public.py +725 -0
  497. axiolune_connectors/public_sources/all_tables_013_public_sources.py +389 -0
  498. axiolune_connectors/public_sources/all_tables_014_public.py +593 -0
  499. axiolune_connectors/public_sources/all_tables_015_public_sources.py +505 -0
  500. axiolune_connectors/public_sources/all_tables_016_public.py +506 -0
  501. axiolune_connectors/public_sources/all_tables_017_public.py +636 -0
  502. axiolune_connectors/public_sources/all_tables_018_public.py +543 -0
  503. axiolune_connectors/public_sources/all_tables_019_public.py +484 -0
  504. axiolune_connectors/public_sources/all_tables_020_public.py +614 -0
  505. axiolune_connectors/public_sources/all_tables_021_public.py +702 -0
  506. axiolune_connectors/public_sources/all_tables_022_public.py +472 -0
  507. axiolune_connectors/public_sources/all_tables_023_public.py +575 -0
  508. axiolune_connectors/public_sources/all_tables_024_public.py +566 -0
  509. axiolune_connectors/public_sources/all_tables_025_public.py +903 -0
  510. axiolune_connectors/public_sources/all_tables_026_public.py +541 -0
  511. axiolune_connectors/public_sources/all_tables_027_public.py +556 -0
  512. axiolune_connectors/public_sources/all_tables_028_public.py +321 -0
  513. axiolune_connectors/public_sources/all_tables_029.py +492 -0
  514. axiolune_connectors/public_sources/all_tables_030_public.py +530 -0
  515. axiolune_connectors/public_sources/all_tables_031_public_sources.py +1059 -0
  516. axiolune_connectors/public_sources/all_tables_032_field_specs.py +117 -0
  517. axiolune_connectors/public_sources/all_tables_032_public_sources.py +815 -0
  518. axiolune_connectors/public_sources/all_tables_033_public.py +9962 -0
  519. axiolune_connectors/public_sources/all_tables_034_public.py +521 -0
  520. axiolune_connectors/public_sources/all_tables_035_public.py +337 -0
  521. axiolune_connectors/public_sources/all_tables_036_public_source.py +388 -0
  522. axiolune_connectors/public_sources/all_tables_037_public_sources.py +453 -0
  523. axiolune_connectors/public_sources/all_tables_038_public_sources.py +384 -0
  524. axiolune_connectors/public_sources/all_tables_039_public_sources.py +855 -0
  525. axiolune_connectors/public_sources/all_tables_040_public_sources.py +526 -0
  526. axiolune_connectors/public_sources/all_tables_041_public_sources.py +790 -0
  527. axiolune_connectors/public_sources/all_tables_042.py +653 -0
  528. axiolune_connectors/public_sources/all_tables_043_public.py +639 -0
  529. axiolune_connectors/public_sources/all_tables_044_public.py +626 -0
  530. axiolune_connectors/public_sources/all_tables_045_public.py +578 -0
  531. axiolune_connectors/public_sources/all_tables_046_public_source.py +434 -0
  532. axiolune_connectors/public_sources/all_tables_047_public_sources.py +418 -0
  533. axiolune_connectors/public_sources/all_tables_048_eastmoney_board_weight.py +501 -0
  534. axiolune_connectors/public_sources/all_tables_049_public_sources.py +498 -0
  535. axiolune_connectors/public_sources/all_tables_050.py +407 -0
  536. axiolune_connectors/public_sources/all_tables_051_public.py +474 -0
  537. axiolune_connectors/public_sources/all_tables_052_public_sources.py +896 -0
  538. axiolune_connectors/public_sources/all_tables_053_public_sources.py +568 -0
  539. axiolune_connectors/public_sources/all_tables_054_public_sources.py +475 -0
  540. axiolune_connectors/public_sources/all_tables_055_public_sources.py +633 -0
  541. axiolune_connectors/public_sources/all_tables_056_public_sources.py +425 -0
  542. axiolune_connectors/public_sources/all_tables_057_public_sources.py +625 -0
  543. axiolune_connectors/public_sources/all_tables_058_public.py +635 -0
  544. axiolune_connectors/public_sources/all_tables_059_public_sources.py +605 -0
  545. axiolune_connectors/public_sources/all_tables_060.py +537 -0
  546. axiolune_connectors/public_sources/all_tables_061_public.py +533 -0
  547. axiolune_connectors/public_sources/all_tables_062_public_sources.py +489 -0
  548. axiolune_connectors/public_sources/all_tables_063_public.py +489 -0
  549. axiolune_connectors/public_sources/all_tables_064_public.py +527 -0
  550. axiolune_connectors/public_sources/all_tables_065_public_sources.py +444 -0
  551. axiolune_connectors/public_sources/all_tables_066_public.py +646 -0
  552. axiolune_connectors/public_sources/all_tables_067.py +598 -0
  553. axiolune_connectors/public_sources/all_tables_068_public_sources.py +537 -0
  554. axiolune_connectors/public_sources/all_tables_069_public.py +587 -0
  555. axiolune_connectors/public_sources/all_tables_070_public_sources.py +604 -0
  556. axiolune_connectors/public_sources/all_tables_071.py +572 -0
  557. axiolune_connectors/public_sources/all_tables_072_public.py +687 -0
  558. axiolune_connectors/public_sources/all_tables_073_public.py +850 -0
  559. axiolune_connectors/public_sources/all_tables_074_public_sources.py +380 -0
  560. axiolune_connectors/public_sources/all_tables_075_public_sources.py +668 -0
  561. axiolune_connectors/public_sources/all_tables_076.py +747 -0
  562. axiolune_connectors/public_sources/all_tables_077_public.py +636 -0
  563. axiolune_connectors/public_sources/all_tables_078_public_sources.py +3960 -0
  564. axiolune_connectors/public_sources/all_tables_079_public.py +793 -0
  565. axiolune_connectors/public_sources/all_tables_080_public.py +796 -0
  566. axiolune_connectors/public_sources/all_tables_081.py +596 -0
  567. axiolune_connectors/public_sources/all_tables_082_public.py +577 -0
  568. axiolune_connectors/public_sources/all_tables_083_public.py +592 -0
  569. axiolune_connectors/public_sources/all_tables_084_public_sources.py +798 -0
  570. axiolune_connectors/public_sources/all_tables_085_public.py +670 -0
  571. axiolune_connectors/public_sources/all_tables_086.py +1044 -0
  572. axiolune_connectors/public_sources/all_tables_087_public.py +512 -0
  573. axiolune_connectors/public_sources/all_tables_088_public.py +534 -0
  574. axiolune_connectors/public_sources/all_tables_089_public.py +978 -0
  575. axiolune_connectors/public_sources/all_tables_090_public.py +648 -0
  576. axiolune_connectors/public_sources/alternative_fund_data.py +412 -0
  577. axiolune_connectors/public_sources/alternative_fund_dictionary_bindings.py +35 -0
  578. axiolune_connectors/public_sources/batch_009_eastmoney_board_weight.py +628 -0
  579. axiolune_connectors/public_sources/batch_010_eastmoney_board_weight.py +415 -0
  580. axiolune_connectors/public_sources/company_profile_contracts.py +881 -0
  581. axiolune_connectors/public_sources/convertible_bond_contracts.py +280 -0
  582. axiolune_connectors/public_sources/convertible_bond_mass_batch.py +235 -0
  583. axiolune_connectors/public_sources/convertible_bonds.py +168 -0
  584. axiolune_connectors/public_sources/corporate_action_contracts.py +137 -0
  585. axiolune_connectors/public_sources/corporate_action_mass_batch.py +306 -0
  586. axiolune_connectors/public_sources/daily_history_mass_batch.py +196 -0
  587. axiolune_connectors/public_sources/derivatives_dictionary_bindings.py +66 -0
  588. axiolune_connectors/public_sources/derivatives_mass_batch.py +243 -0
  589. axiolune_connectors/public_sources/derived_occurrence_completion.py +749 -0
  590. axiolune_connectors/public_sources/dictionary_100_public.py +404 -0
  591. axiolune_connectors/public_sources/direct_source_table_gateway.py +179 -0
  592. axiolune_connectors/public_sources/dm_cdm_001_public_sources.py +534 -0
  593. axiolune_connectors/public_sources/earnings_forecast_mass_batch.py +192 -0
  594. axiolune_connectors/public_sources/eastmoney.py +1722 -0
  595. axiolune_connectors/public_sources/eastmoney_hsgt_flow.py +239 -0
  596. axiolune_connectors/public_sources/eastmoney_money_flow.py +331 -0
  597. axiolune_connectors/public_sources/eastmoney_public_flow_batch.py +2604 -0
  598. axiolune_connectors/public_sources/eastmoney_sdk.py +199 -0
  599. axiolune_connectors/public_sources/eurostat_ecb_data.py +370 -0
  600. axiolune_connectors/public_sources/extension_registry.py +218 -0
  601. axiolune_connectors/public_sources/extension_registry_test_fixture.py +68 -0
  602. axiolune_connectors/public_sources/factor_signal_contracts.py +351 -0
  603. axiolune_connectors/public_sources/fao_data.py +393 -0
  604. axiolune_connectors/public_sources/financial_formula_owner_contracts.py +187 -0
  605. axiolune_connectors/public_sources/financial_formula_thousand_batch.py +1618 -0
  606. axiolune_connectors/public_sources/financial_institution_analytics.py +239 -0
  607. axiolune_connectors/public_sources/financial_statement_mass_batch.py +278 -0
  608. axiolune_connectors/public_sources/fixed_income.py +806 -0
  609. axiolune_connectors/public_sources/fixed_income_contracts.py +815 -0
  610. axiolune_connectors/public_sources/fund_data.py +2937 -0
  611. axiolune_connectors/public_sources/fund_holdings_allocation_mass_batch.py +132 -0
  612. axiolune_connectors/public_sources/fund_manager_mass_batch.py +205 -0
  613. axiolune_connectors/public_sources/fund_risk_derived.py +932 -0
  614. axiolune_connectors/public_sources/fundamental_contracts.py +277 -0
  615. axiolune_connectors/public_sources/fundamental_metric_contracts.py +153 -0
  616. axiolune_connectors/public_sources/global_security_data.py +478 -0
  617. axiolune_connectors/public_sources/global_security_data_contracts.py +179 -0
  618. axiolune_connectors/public_sources/imf_bis_sdmx_data.py +361 -0
  619. axiolune_connectors/public_sources/index_board_data.py +798 -0
  620. axiolune_connectors/public_sources/index_dictionary_bindings.py +154 -0
  621. axiolune_connectors/public_sources/index_financial_derivative.py +284 -0
  622. axiolune_connectors/public_sources/index_fund_contracts.py +286 -0
  623. axiolune_connectors/public_sources/index_funds.py +472 -0
  624. axiolune_connectors/public_sources/index_mass_batch.py +342 -0
  625. axiolune_connectors/public_sources/industry_financial.py +2772 -0
  626. axiolune_connectors/public_sources/intraday_history_mass_batch.py +186 -0
  627. axiolune_connectors/public_sources/landing_ads_eqw_001_public.py +891 -0
  628. axiolune_connectors/public_sources/landing_batch_001_contracts.py +103 -0
  629. axiolune_connectors/public_sources/landing_batch_002_public_sources.py +525 -0
  630. axiolune_connectors/public_sources/landing_batch_003.py +339 -0
  631. axiolune_connectors/public_sources/landing_batch_005_board_weights.py +341 -0
  632. axiolune_connectors/public_sources/landing_batch_006_board_weights.py +443 -0
  633. axiolune_connectors/public_sources/landing_batch_007_board_weights.py +86 -0
  634. axiolune_connectors/public_sources/landing_batch_008_board_surface.py +221 -0
  635. axiolune_connectors/public_sources/landing_batch_011_eastmoney_board_weight.py +396 -0
  636. axiolune_connectors/public_sources/landing_batch_012_eastmoney_board_weight.py +373 -0
  637. axiolune_connectors/public_sources/landing_batch_013_eastmoney_board_weight.py +388 -0
  638. axiolune_connectors/public_sources/landing_batch_014_public_sources.py +541 -0
  639. axiolune_connectors/public_sources/landing_batch_015_csi_index.py +324 -0
  640. axiolune_connectors/public_sources/macro.py +769 -0
  641. axiolune_connectors/public_sources/macro_contracts.py +707 -0
  642. axiolune_connectors/public_sources/macro_extended_contracts.py +153 -0
  643. axiolune_connectors/public_sources/macro_sdmx_mass_batch.py +372 -0
  644. axiolune_connectors/public_sources/market_activity_contracts.py +1074 -0
  645. axiolune_connectors/public_sources/market_contracts.py +1104 -0
  646. axiolune_connectors/public_sources/market_price_mass_batch.py +1672 -0
  647. axiolune_connectors/public_sources/mirror_binding_candidates.py +444 -0
  648. axiolune_connectors/public_sources/money_market_data.py +443 -0
  649. axiolune_connectors/public_sources/money_market_data_contracts.py +92 -0
  650. axiolune_connectors/public_sources/native_dictionary_runtime.py +946 -0
  651. axiolune_connectors/public_sources/ods_cdm_001_public.py +654 -0
  652. axiolune_connectors/public_sources/ods_eamdata_dwd_tradedata_001.py +587 -0
  653. axiolune_connectors/public_sources/ods_tradedata_cache_001.py +486 -0
  654. axiolune_connectors/public_sources/oecd_sdmx_data.py +304 -0
  655. axiolune_connectors/public_sources/official_exchanges.py +354 -0
  656. axiolune_connectors/public_sources/ownership_contracts.py +506 -0
  657. axiolune_connectors/public_sources/ownership_governance_mass_batch.py +935 -0
  658. axiolune_connectors/public_sources/pit_index_change.py +185 -0
  659. axiolune_connectors/public_sources/pit_ttm_derived_contracts.py +1214 -0
  660. axiolune_connectors/public_sources/private_fund_data.py +342 -0
  661. axiolune_connectors/public_sources/private_fund_data_contracts.py +103 -0
  662. axiolune_connectors/public_sources/private_fund_dictionary_bindings.py +132 -0
  663. axiolune_connectors/public_sources/public_daily_derived_batch.py +1261 -0
  664. axiolune_connectors/public_sources/public_exchange_security_master_batch.py +281 -0
  665. axiolune_connectors/public_sources/public_financial_occurrence_batch.py +1221 -0
  666. axiolune_connectors/public_sources/public_fund_actual_batch.py +158 -0
  667. axiolune_connectors/public_sources/public_hk_equity_exact_batch.py +197 -0
  668. axiolune_connectors/public_sources/public_hk_profile_exact_batch.py +195 -0
  669. axiolune_connectors/public_sources/public_index_financial_derivative.py +1303 -0
  670. axiolune_connectors/public_sources/public_neeq_financial_batch.py +307 -0
  671. axiolune_connectors/public_sources/public_neeq_share_capital_batch.py +239 -0
  672. axiolune_connectors/public_sources/public_open_finance_batch.py +1959 -0
  673. axiolune_connectors/public_sources/public_reference_actual_batch.py +97 -0
  674. axiolune_connectors/public_sources/public_reference_completion_batch.py +402 -0
  675. axiolune_connectors/public_sources/public_reference_mass_batch.py +615 -0
  676. axiolune_connectors/public_sources/publication_contracts.py +99 -0
  677. axiolune_connectors/public_sources/remaining_fund_dictionary_bindings.py +29 -0
  678. axiolune_connectors/public_sources/risk_model_mass_batch.py +556 -0
  679. axiolune_connectors/public_sources/rqdatac_001_public.py +977 -0
  680. axiolune_connectors/public_sources/sec_company_facts.py +324 -0
  681. axiolune_connectors/public_sources/security_master_mass_batch.py +269 -0
  682. axiolune_connectors/public_sources/tencent.py +177 -0
  683. axiolune_connectors/public_sources/tenjqka.py +49 -0
  684. axiolune_connectors/public_sources/ths_index_contracts.py +92 -0
  685. axiolune_connectors/public_sources/ths_index_data.py +133 -0
  686. axiolune_connectors/public_sources/us_eod_derivative_public.py +361 -0
  687. axiolune_connectors/public_sources/us_official_data.py +425 -0
  688. axiolune_connectors/public_sources/world_bank_data.py +258 -0
  689. axiolune_connectors/public_sources/zxmarket_native.py +718 -0
  690. axiolune_connectors/registry.py +48 -0
  691. axiolune_connectors/resilience.py +416 -0
  692. axiolune_connectors/resources/runtime-reference-manifest.json +1 -0
  693. axiolune_connectors/resources/runtime-reference.zip +0 -0
  694. axiolune_connectors/runtime_resources.py +129 -0
  695. axiolune_connectors/symbols.py +38 -0
  696. axiolune_contracts/__init__.py +1098 -0
  697. axiolune_contracts/_version.py +16 -0
  698. axiolune_contracts/ads_fundamental_factor.py +100 -0
  699. axiolune_contracts/alternative_fund_data.py +58 -0
  700. axiolune_contracts/eurostat_ecb_data.py +142 -0
  701. axiolune_contracts/factor_correlation.py +121 -0
  702. axiolune_contracts/factor_performance.py +59 -0
  703. axiolune_contracts/fao_data.py +138 -0
  704. axiolune_contracts/financial.py +832 -0
  705. axiolune_contracts/financial_institution_analytics.py +35 -0
  706. axiolune_contracts/fund_data.py +108 -0
  707. axiolune_contracts/global_security_data.py +101 -0
  708. axiolune_contracts/imf_bis_sdmx_data.py +62 -0
  709. axiolune_contracts/index_board_data.py +129 -0
  710. axiolune_contracts/industry_financial.py +155 -0
  711. axiolune_contracts/models.py +8715 -0
  712. axiolune_contracts/money_market_data.py +102 -0
  713. axiolune_contracts/oecd_sdmx_data.py +140 -0
  714. axiolune_contracts/ontology.py +69 -0
  715. axiolune_contracts/private_fund_data.py +99 -0
  716. axiolune_contracts/public_daily_derived.py +99 -0
  717. axiolune_contracts/qlib_features.py +92 -0
  718. axiolune_contracts/risk_factor_features.py +131 -0
  719. axiolune_contracts/risk_model_aggregate.py +114 -0
  720. axiolune_contracts/world_bank_data.py +147 -0
  721. axiolune_plugin_manifests/axiolune.files.json +11 -0
  722. axiolune_research_engine/__init__.py +67 -0
  723. axiolune_research_engine/_version.py +16 -0
  724. axiolune_research_engine/analysis.py +252 -0
  725. axiolune_research_engine/backtest.py +542 -0
  726. axiolune_research_engine/benchmark_relative.py +535 -0
  727. axiolune_research_engine/cross_section_portfolio_backtest.py +612 -0
  728. axiolune_research_engine/digest.py +12 -0
  729. axiolune_research_engine/evidence.py +306 -0
  730. axiolune_research_engine/factor_cross_section.py +583 -0
  731. axiolune_research_engine/formula_dsl.py +726 -0
  732. axiolune_research_engine/fundamental_diagnostics.py +328 -0
  733. axiolune_research_engine/landed_factor_families.py +512 -0
  734. axiolune_research_engine/market.py +384 -0
  735. axiolune_research_engine/market_overview.py +479 -0
  736. axiolune_research_engine/market_registry.py +228 -0
  737. axiolune_research_engine/market_risk_liquidity.py +462 -0
  738. axiolune_research_engine/market_state.py +912 -0
  739. axiolune_research_engine/market_structure.py +392 -0
  740. axiolune_research_engine/portfolio_analysis.py +418 -0
  741. axiolune_research_engine/semantic_dataset.py +1043 -0
  742. axiolune_research_engine/time_basis.py +23 -0
  743. axiolune_research_engine/universe_screen.py +785 -0
  744. axiolune_semantic_runtime/__init__.py +19 -0
  745. axiolune_semantic_runtime/_version.py +16 -0
  746. axiolune_semantic_runtime/catalog.py +207 -0
  747. axiolune_semantic_runtime/mapping_registry.py +190 -0
  748. axiolune_semantic_runtime/materializer.py +1932 -0
  749. axiolune_semantic_runtime/resources/__init__.py +1 -0
  750. axiolune_semantic_runtime/resources/a-share-first-slice.mapping.yaml +838 -0
  751. axiolune_semantic_runtime/resources/fundamental-system.shacl.ttl +67 -0
  752. axiolune_semantic_runtime/resources/market-data-catalog.json +2572 -0
@@ -0,0 +1,84 @@
1
+ # 等权与 top-k 目标分配
2
+
3
+ `axiolune.allocations.evaluate_allocations` 在已有 `Frame` 上执行布尔选择和可选的 Decimal 评分,再生成精确、无量纲的目标权重。输出包含所有输入成员、未入选原因、分配分母和未分配比例。依赖 `[local]`;表达式仍由现有 Polars 或 DuckDB 执行。
4
+
5
+ ## 使用已有固定来源
6
+
7
+ 以下代码使用调用者已有的 TAIFEX 可接受政府债券快照 `snapshot_id` 与 `store`。它给来源清单成员分配等权,属于来源分析;清单成员身份和投资适用性须分别审查。
8
+
9
+ ```python
10
+ from axiolune.allocations import (
11
+ AllocationBudget, AllocationRule, AllocationSpec, evaluate_allocations,
12
+ )
13
+ from axiolune.typed_frame import DType, FieldBinding, Frame, FrameContract, Order
14
+
15
+ source = store.read(snapshot_id)
16
+ contract = FrameContract(
17
+ "my-research.collateral-members", "1",
18
+ source.receipt.dataset_id, source.receipt.actual_provider,
19
+ (
20
+ FieldBinding("Date", "source_date", DType("text"), "identity", False),
21
+ FieldBinding("Code", "source_code", DType("text"), "identity", False),
22
+ ),
23
+ ("source_date", "source_code"),
24
+ )
25
+ frame = Frame.from_snapshot(store, snapshot_id, contract=contract)
26
+ spec = AllocationSpec(
27
+ definition_id="my-research.equal-members", version="1",
28
+ selection=frame.column("source_code").eq(frame.column("source_code")),
29
+ group_by=("source_date",), member_key=("source_code",),
30
+ order=Order(("source_date", "source_code")),
31
+ rule=AllocationRule(
32
+ method="equal_weight", maximum_weight="1/10", unknown_selection="reject",
33
+ ),
34
+ )
35
+ result = evaluate_allocations(
36
+ frame, spec, engine="duckdb",
37
+ budget=AllocationBudget(max_rows=10_000, max_bytes=16 * 1024 * 1024),
38
+ )
39
+ print(result.groups.to_pylist())
40
+ print(result.members.to_pylist())
41
+ portable_spec = spec.to_dict()
42
+ assert AllocationSpec.from_dict(portable_spec).to_dict() == portable_spec
43
+ ```
44
+
45
+ 此例的 `1/10` 是调用者明确选择的单成员上限,不是市场规则或包内费用假设。已有非空代码的自等比较选择全部来源成员;实际策略可以使用同一 Frame 的其他已类型检查布尔表达式。金额、货币、交易手数、价格、成交、交收和账户变动均由后续消费者明确提供,不能从这些权重推断。
46
+
47
+ ## 分配合同
48
+
49
+ `AllocationSpec` 固定 `definition_id`、显式 `version`、Frame 来源摘要、选择/评分的完整 AST、分组列、成员键、唯一输出顺序和 `AllocationRule`。`to_dict/from_dict` 使用闭字段版本 1 合同。定义版本为调用者原生版本文字;改变定义应同时变更其版本,内容摘要始终独立保留。
50
+
51
+ 每个分组中成员键必须唯一且非 null。一个成员可在不同分组重复出现;每个分组独立确定分母。分组可以为空元组,此时全部行属于一个分组。空输入返回有固定 schema 的空组表和成员表。顺序复用 `Frame.collect` 的完整唯一 `Order`;输入行排列不会替代显式顺序。
52
+
53
+ | 规则字段 | 行为 |
54
+ |---|---|
55
+ | `method="equal_weight"` | 对选择结果为 true 的成员等权;评分字段和 top-k 策略必须为空。 |
56
+ | `method="top_k"` | 仅对选择为 true、评分非空的成员排序,使用显式 `top_k` 与 `descending_score`。评分须为有单位声明的 Decimal 表达式;零与负值正常参与。 |
57
+ | `unknown_selection` | `exclude` 保留成员并记录 `selection_unknown`;`reject` 拒绝整个调用。false 固定记录 `selection_false`。 |
58
+ | `missing_score` | top-k 候选评分缺失时,`exclude` 记录 `score_missing`,或 `reject` 拒绝调用。已经因选择被排除的成员不会参与评分缺失判断。 |
59
+ | `boundary_ties` | `order` 用明确顺序选足 k 个;`include` 纳入所有与第 k 名同分的成员,因此可能超过 k;`reject` 在边界同分时拒绝。 |
60
+ | `maximum_weight` | 正、约分后、至多为一的 `分子/分母` 字符串,两操作数各不超过 128 bit。没有浮点权重或隐式舍入。 |
61
+
62
+ 最终选择 n 个成员时,每个权重为 `min(maximum_weight, 1/n)`;未选择成员为 `0/1`。未分配比例为 `1 − n × 单成员权重`,不会将受上限限制的残余再次摊给其他成员。n 为零时保留 `1/1` 未分配。top-k 大于有效候选数时使用全部有效候选;分母由实际最终选择集合确定。
63
+
64
+ 例如 k=1、首位两个成员同分时,`include` 选择两个成员,单成员上限允许时各 `1/2`;`order` 依显式顺序只选择第一个。`score_position` 是按评分与显式顺序得到的一基位置,用于解释选择,不是共享同分名次。
65
+
66
+ ## 输出与来源
67
+
68
+ - `result.groups`:每组总数、有效候选数、最终选择数、未选择数、边界扩展数、单成员权重、分配比例、未分配比例、状态和排除原因计数。
69
+ - `result.members`:所有输入行的顺序、原行键、组键、成员键、三态选择、原 Decimal 评分文字、候选/选择状态、原因、精确权重和评分位置。键使用现有带类型编码,日期与文本不会合并。
70
+ - `result.receipt`:不可变规格、完整输入收据与 lineage、资格、两个表的内容摘要和总结果摘要、实际引擎信息及预算。`to_arrow()` 返回两个原 Arrow 表和可独立编辑的收据副本。
71
+
72
+ 结果内容摘要固定实际输入/规格/有序表值,排除运行耗时和物理引擎计划;两个引擎在合同交集内得到相同逻辑结果时摘要相同。评分可以来自现有排名等 AST;分配模块不另写一个评分引擎。来源清单和观察日期不会自动成为规范证券身份或合法交易会话。
73
+
74
+ ## 预算和资格
75
+
76
+ `AllocationBudget` 集中定义行数、组数、累计表示字节、单份 metadata 上限和性能计数器超时;行数和总字节与原 Frame 上限取较小值。metadata 在 canonical JSON 分配之前进行保守的转义 UTF-8、节点和深度预检。累计字节记录实际显式序列化的中间表示、Arrow 缓冲区与有序行哈希输入;同一数据的多种表示各自计入。receipt 中的 `admitted_representation_bytes_before_final_receipt` 明确不包含该最终收据自身;最终收据另外接受同一预算检查。
77
+
78
+ 这些计数不表示 Python 进程 RSS 或操作系统硬实时上界。既有表达式引擎调用完成后会检查 deadline,逐成员分配和内容哈希也有检查点;此接口不会强行中断引擎内部的同步调用。
79
+
80
+ 默认 `purpose="source_analysis"` 保留现有来源资格;`strict_research` 仍要求相应输入资格。权重本身不建立历史市场可知时间、合法下一会话、价格限制或交易能力。P4 的目标转订单、有效期市场规则、共享账本及 Paper 账户继续按各自实际合同接入。
81
+
82
+ ## 验证
83
+
84
+ `validation/allocations.py` 使用单独的原创数学说明核对等权、上限残余、未知值、缺失评分、零/负/大 Decimal、同分三种策略、重复成员及预算拒绝。真实来源轮在保留原件的独立副本上执行政府债券成员与外汇观察成员,逐行核对两个引擎的结果和来源摘要;外汇日期成员只用于验证排序分配,不充当可交易资产。验证器禁止网络,并在前后核对原来源目录及运行文件的字节摘要。
@@ -0,0 +1,71 @@
1
+ # Optional paper execution port
2
+
3
+ `axiolune.broker.BrokerPort` is a small Python protocol for explicit submission,
4
+ cancellation, outcome application, status queries and report reconciliation.
5
+ The shipped `LedgerPaperBroker` adapter binds one existing `Session.ledger`
6
+ paper account. It has no network transport or external credentials, and its
7
+ capabilities always report `live_execution_enabled=False`. A conforming plugin
8
+ does not gain automatic execution authorization or become automatically loaded.
9
+
10
+ ```python
11
+ from axiolune.broker import BrokerPort, LedgerPaperBroker
12
+
13
+ broker: BrokerPort = LedgerPaperBroker(session.ledger, paper_account_id)
14
+ print(broker.capabilities())
15
+
16
+ # Existing target_orders.prepare_paper_orders or original ledger admission.
17
+ accepted = broker.submit(prepared_orders.command)
18
+ status = broker.query(prepared_orders.command["command_id"])
19
+
20
+ # Existing paper_matching.prepare_paper_match produces this exact command.
21
+ outcome = broker.apply_reports(prepared_match.command)
22
+ order = broker.order(order_id)
23
+ page = broker.reports(after_sequence=0, limit=100)
24
+ comparison = broker.reconcile(page["events"], through_head=page["through_head"])
25
+ ```
26
+
27
+ The original shared ledger remains the order, quantity, cash, position, obligation
28
+ and event authority. `submit` accepts its ordinary `OrderDeclared` or
29
+ `FuturesOrderDeclaredV1`; `cancel` accepts `OrderRemainderCancelled` or
30
+ `FuturesOrderCancelledV1`; `apply_reports` accepts the existing retained paper
31
+ recognition/settlement events. Funding, original record admission, model retention
32
+ and source matching retain their existing APIs. Source quotes are not converted
33
+ into account executions by this adapter.
34
+
35
+ All mutation methods preserve the caller's complete command, command ID, event
36
+ IDs, actor declaration and expected account head. They accept the original
37
+ `expected_plan_sha256`, `LedgerBudget` and cancellation event. Exact retries return
38
+ the original result without another order; changed bytes under a committed ID
39
+ raise `CommandIdentityConflict`. The adapter shares the core invocation meter and
40
+ uses the existing atomic commit path.
41
+
42
+ If SQLite reports an inconclusive commit, the response has `status="unknown"`
43
+ and retains the original command ID/request digest. Query that ID; never invent
44
+ a replacement ID because an acknowledgement was lost. `query` returns
45
+ `committed` or `not_observed`. The latter does not prove a concurrent invocation
46
+ will never commit. Wait for that invocation to finish, then retry only the exact
47
+ original command if needed. A lost HTTP/client response would use the same query
48
+ discipline; no external broker transport is supplied here.
49
+
50
+ Cancellation declares the exact remaining quantity against a specific head.
51
+ If a fill commits first, stale cancellation fails with `LedgerRevisionConflict`.
52
+ Read the actual order, then explicitly prepare a new cancellation of its remaining
53
+ quantity. Already executed quantity is never rolled back by cancellation. The
54
+ reverse race uses the same CAS and remainder checks. `order` projects the shared
55
+ state as open, partially filled, partially cancelled, filled or cancelled while
56
+ always returning exact requested/executed/cancelled/remaining values.
57
+
58
+ Reports are the existing immutable ledger event pages, including nontrade account
59
+ events so the sequence stays continuous. A consumer stores its own cursor and
60
+ pins `through_head` across pages. `reconcile` accepts a bounded page of event
61
+ envelopes in any delivery order, tolerates exact duplicate deliveries, and reports
62
+ missing, unexpected or differing event IDs. It compares original bytes/hashes;
63
+ it never alters the account to agree with an incoming callback. A matched page
64
+ does not imply every page was received. Use `ledger.replay` for complete account
65
+ semantic reconciliation and its existing accounting invariants.
66
+
67
+ The local proof used the original September 21 paper order prefix and a genuine
68
+ later retained Gemini print in a new private copy. It recomputed paper fills and
69
+ cancelled the remainder on October 4; it did not redate a fresh order or claim a
70
+ current-market execution. No original source/evidence bytes changed, no provider
71
+ request was made, and no real order was sent.
@@ -0,0 +1,130 @@
1
+ # 公司研究
2
+
3
+ 公开入口为 `axiolune.company_research`,使用现有 `Session` 和
4
+ `FinancialQuerySpec`;需要 `financial` 依赖。没有另设行情抓取器、财务内核或数据库。
5
+
6
+ 当前源码另提供[原生三表绑定准备器](SOURCE-FINANCIAL-BINDINGS.md):
7
+ `company inspect-bindings/prepare` 与 `source_financials.prepare_company` 支持显式大陆宽表、
8
+ 港股长表及其他 JSON 财报映射。该增量已包含在 a18 中;未知源存储/共享资格仍不获授权。
9
+
10
+ ```python
11
+ from axiolune.company_research import (
12
+ CompanyInput, CompanyResearch, ValuationAssumptions,
13
+ )
14
+
15
+ # financial_query 是固定财报快照、来源指针、声明证据及运算组成的 FinancialQuerySpec。
16
+ # 所有非空别名必须是 financial_query.outputs 中的节点。
17
+ company = CompanyInput(
18
+ entity_id="sec:cik:0000320193",
19
+ query=financial_query,
20
+ metrics={"income": "net_income", "revenue": "revenue",
21
+ "outstanding": "instant_common_shares", "unknown_claim": None},
22
+ )
23
+ research = CompanyResearch(session).evaluate(
24
+ company,
25
+ assumptions=assumptions, # ValuationAssumptions;可省略以只做财务研究
26
+ peers=peer_inputs,
27
+ compare=("income", "revenue"),
28
+ comparison_period_policy="exact",
29
+ )
30
+ document = research.to_dict()
31
+ ```
32
+
33
+ 已有财务查询支持的单季、TTM、利润率、负债比例、平均资产/权益回报及每股收益,
34
+ 继续放在 `FinancialQuerySpec` 中计算。公司研究保留完整财务 receipt、原始 fact/output
35
+ 身份、期间、单位、来源快照和 Citation,不把调用方的会计口径声明升级为业务认证。
36
+
37
+ 同业必须是不同实体。默认比较相同概念、期间、币种/单位、会计基础和合并范围。
38
+ 不相容或缺失的行保留数值与排除原因,同行中位数排除研究主体。显式选择
39
+ `fiscal_year_end_year` 时,也允许同一公历年结束、长度 330–400 天的年度报告期间;
40
+ 原始日期及金额均保留,不声称已经对齐经营月份或按年化处理。别名不会自动使不同概念等价。
41
+
42
+ ## 估值假设
43
+
44
+ `ValuationAssumptions` 要求作者、带时区的创建时间、理由、币种、估值日、资产负债表日、
45
+ 会计基础/范围、流通股数别名和股本口径说明。金额、倍数和利率只接收有限 `Decimal`。
46
+ 序列化为十进制字符串,`from_dict()` 可还原,`version_id` 固定完整假设内容。
47
+ `revise(author=..., created_at=..., rationale=..., multiple=...)` 产生引用旧版本哈希的新版本。
48
+
49
+ 三种方法:
50
+
51
+ - `equity_multiple`:`metric × multiple` 直接得到股权价值;输入为声明的期间货币指标。
52
+ - `enterprise_multiple`:先得到企业价值,再使用逐项价值桥。
53
+ - `dcf_fcff`:1–40 个显式年度、年末支付的基础币种 FCFF 假设,按
54
+ `discount_rate` 折现。`terminal_growth` 非空时使用 Gordon 永续增长,并要求
55
+ `-1 < g < r`;空值明确表示不计终值。模块不把净利润或经营现金流自动当作 FCFF。
56
+
57
+ `BridgeLine(metric, sign, explanation)` 逐项加回非经营资产或扣除债权等索取权。
58
+ 每个余额和实际流通股数须是同一资产负债表日的时点事实,单位可以显式缩放。
59
+ `bridge_complete` 与 `bridge_policy` 说明本次假设覆盖哪些项目、哪些被排除;
60
+ 不完整桥或任何缺失项目使股权/每股价值保持未知。没有默认零负债、隐式汇率或隐式稀释。
61
+ 期间加权平均股数会被拒绝作为时点估值分母。终值、价值桥和每股价值均有计算及输入回链。
62
+ 负数盈利的常规正倍数估值显示不适用;未人为截断负的 DCF 股权情景结果。
63
+
64
+ 例如倍数敏感性传入
65
+ `sensitivity={"multiple": [Decimal("15"), Decimal("20"), Decimal("25")]}`;
66
+ DCF 可同时传入 `discount_rate`、`terminal_growth` 两个轴,最多 121 个情景。
67
+ 每格保留假设版本与原始假设父版本。非法组合直接拒绝,缺失输入保留未知。
68
+ 中间运算用精确有理数,最终显示调用共享财务内核的 `ROUND_HALF_EVEN` 舍入。
69
+
70
+ ## 研究对象和 Run
71
+
72
+ `research.research_content(question=...)` 可交给现有 `team.research.create`、
73
+ `save_draft`、`freeze`。`research.save_research(team, project_id=..., title=...,
74
+ question=..., idempotency_key=...)` 是现有创建 API 的薄封装,仍由团队 API 管理权限和修订。
75
+ 派生研究内容不会授予来源发布许可。
76
+
77
+ `CompanyInput.source_run_id` 可指定已有成功的财务 Run;此时 `evaluate(..., team=team)`
78
+ 通过已认证团队 API 及原 Artifact reader 检查完整财务 receipt、Run、revision、environment
79
+ 和 input 身份是否与本次实际求值相同,并记录 resource/Run/Artifact 引用。
80
+ 该引用明确属于**输入财务计算**,不声称既有 Run 执行过后来新增的估值假设。
81
+ 需要后台执行时,用 `CompanyResearchSpec` 将公司、同业、估值假设和敏感性网格放入现有
82
+ `ResearchBundleSpec`。方法名为 `company_research_with_evidence`,由现有 query worker
83
+ 调度;继续使用原 Run 的租约、取消、权限、环境身份、版本和 Artifact 保存端口。
84
+
85
+ ```python
86
+ from axiolune.company_research import CompanyResearchSpec
87
+
88
+ spec = CompanyResearchSpec(company, assumptions=assumptions, peers=tuple(peer_inputs),
89
+ compare=("income", "revenue"))
90
+ # published_inputs 是既有 BundleRef 序列,覆盖 spec.required_refs 及来源父引用闭包。
91
+ # environment_id 对应实际执行环境;输入须已按现有权限和来源条款发布。
92
+ published_inputs = spec.publish_inputs(session, team, project_id=project_id,
93
+ allowed_actors=actual_actor_ids)
94
+ run = spec.submit(team, inputs=published_inputs, project_id=project_id,
95
+ title="公司估值", question="当前假设对应的价值与同业差异?",
96
+ environment_id=environment_id, idempotency_key=request_key)
97
+ state = team.runs.status(run_id=run["id"])
98
+ saved = CompanyResearchSpec.result(team, run_id=run["id"])
99
+ ```
100
+
101
+ 现有 `python -m axiolune.adapters.workers query` 执行该任务;参数沿用 worker 帮助。
102
+ `result()` 在未完成时返回真实状态和空结果,成功后返回研究修订、Run、Artifact 及结果。
103
+ 重现继续使用 `team.runs.reproduce`。结果内容不含本次执行墙钟时间,因此相同固定输入可以
104
+ 比较完整表和内容身份;实际执行时间保留在外层 Run。完成校验会重新读取来源并计算完整结果。
105
+ 排队的 `CompanyInput.source_run_id` 必须为空;此任务自己的 Run 记录本次执行。
106
+ 手动保存的 `research_content()` 是派生研究文档,后台可执行形式是上述 Spec。
107
+
108
+ ## 实际例子
109
+
110
+ `validation/company_research.py` 在私有存储副本运行。2026-09-21 的实际结果位于
111
+ `build/package-system/company-research-20260921/`:
112
+
113
+ - `example-inputs.json`:可用 `CompanyInput.from_dict`、`ValuationAssumptions.from_dict` 重载。
114
+ - `company-result.json`、`dcf-result.json`:两家公司实际财报输入与明确标注的估值情景。
115
+ - `report.json`:15 项实际检查,包括独立高精度 Decimal 估值计算和来源回链。
116
+
117
+ 苹果使用已保留的 FY2025 原件;微软使用实际 SEC companyfacts 响应
118
+ `f8aae2965b20ad0df44bdf7ccbedf797d275b6b8dc030154a7a311361bb7246f`。
119
+ 验证执行本身离线,前置微软采集为一次真实公开 HTTP 获取。
120
+ 示例的倍数、FCFF、折现率和终值增长率是作者假设,不是市场观测。
121
+ 上述首轮只验证本地计算。后续 `validation/company_research_run.py` 已通过真实 TCP、
122
+ PostgreSQL、团队研究保存、现有 query worker、Artifact 完成校验和一次 Run 重现。
123
+ 结果位于 `build/package-system/company-research-run-20260921-r3/report.json`:
124
+ 15 个实际输入引用,两个成功 Run 的结果内容和 Parquet 表一致,业务 HTTP 为零。
125
+ 该后台例子仅使用可分享的发行人财报及所需指标;旧例子中未获分享许可的私有方法说明
126
+ 仍被现有权限拒绝,原失败保留。验证后私有 PostgreSQL 已停止。
127
+
128
+ 方法来源:[SEC 财报 API 的单位与期间说明](https://www.sec.gov/search-filings/edgar-application-programming-interfaces)、
129
+ [Damodaran 估值课程](https://pages.stern.nyu.edu/~adamodar/New_Home_Page/lectures/val.html)、
130
+ [企业价值与每股价值](https://pages.stern.nyu.edu/adamodar/New_Home_Page/littlebook/valuepershare.htm)。
@@ -0,0 +1,84 @@
1
+ # 已加载数据的刷新就绪状态
2
+
3
+ `s.data.readiness(as_of=...)` 返回可 JSON 序列化摘要;`is_tradable`、
4
+ `next_future_expiry`、`suggested_tradable_time` 复用同一核。
5
+ 后两者返回 UTC `datetime | None`。调用只读,不联网、不刷新、不创建调度任务。
6
+ `as_of` 必須显式提供带时区时间;系统不猜市场、开盘时间、节假日或发布计划。
7
+
8
+ 成功的 `fetch`、`read`、`import_file`、`import_sql` 自动登记当前会话实际加载的
9
+ receipt;失败获取不会登记。登记只留 receipt,不复制数据,不改变现有缓存。
10
+ 对返回对象留弱引用,供只读来源字段绑定核对;不会延长数据对象寿命。
11
+ 每个 input_id 同时包含 dataset、provider、实际参数、返回字段与来源合同版本,
12
+ 因此两个不同参数请求不是同一个所需输入。新的成功读取替换同一 input_id 的旧记录。
13
+ 索引受 Session 行/字节预算限制;被淘汰的所需输入明确报告 input_not_loaded。
14
+
15
+ ```python
16
+ summary = s.data.readiness(as_of=observed_clock)
17
+ input_id = summary["inputs"][0]["input_id"]
18
+ requirements = {
19
+ input_id: {
20
+ "refresh_after": publisher_required_refresh_utc,
21
+ "next_update_at": publisher_next_update_utc,
22
+ "evidence": publisher_schedule_reference,
23
+ "publication": {"kind": "data_cutoff", "precision": "date", "at": required_data_date},
24
+ }
25
+ }
26
+ summary = s.data.readiness(
27
+ as_of=observed_clock, required=requirements, market_open=next_open_utc,
28
+ publications={input_id: {
29
+ "result": loaded_result, "field": original_source_date_field,
30
+ "partition_by": original_source_series_keys,
31
+ "evidence": publisher_field_definition_reference,
32
+ }},
33
+ )
34
+ ```
35
+
36
+ 声明中的时间用带时区 ISO 字符串。`refresh_after` 是本次使用要求已经完成的最近
37
+ 来源刷新时刻;`next_update_at` 是下一次预期来源更新;`evidence` 是支持该声明的
38
+ 来源依据。这些声明来自调用者实际采用的来源/市场合同,摘要原样保留。日期粒度的
39
+ 公告不能擅自变成午夜发布时间。若没有依据,应省略声明,结果保持 unknown 阻塞。
40
+
41
+ **计划不是实际完成证据。** 即使HTTP成功且TTL新鲜,抓取时间超过计划发布时间也不能
42
+ 证明发布者更新了数据。所需输入还必须声明 `publication`:`kind` 为 `data_cutoff`
43
+ 或 `publication_time`,`precision` 为 `date` 或 `timestamp`,`at` 为要求达到的实际
44
+ 数据截止/发布时间。日期保持日期精度,timestamp必须带时区。
45
+
46
+ `publications` 绑定当前会话实际返回且仍被调用者持有的 SourceResult、原始来源字段、
47
+ 字段语义依据,以及可选的来源序列身份字段 `partition_by`。系统核对对象身份、原始
48
+ 响应和schema哈希、原字段身份;不能提交一个只有新时间戳的替代receipt。摘要记录
49
+ 实际观察值、字段、分区数量、request_id与响应哈希。数据截止取各已观察序列的最新日期,
50
+ 再要求每个序列都达到阈值;发布时间要求所有返回行的发布时间达到阈值。空/未知值不满足。
51
+ 多序列来源应显式提供完整身份字段;未返回的序列仍须作为独立 required 输入声明,
52
+ 本接口不从一条最新记录推导全市场覆盖。数据截止满足也不证明新的修订批次已经发布。
53
+
54
+ 未提供实际字段绑定或所需截止/发布时间时,`publication.status` 为 `unknown`,
55
+ 阻塞 `publication_unknown`,无论计划链接、抓取时刻和TTL是否满足。已观察到的源数据
56
+ 早于所需时刻则为 `not_satisfied`。这些检查不会把 `fetched_at` 当成发布时间。
57
+
58
+ ready 只表示 **显式所需的这些已加载输入满足给定刷新合同**:receipt完整、非空、
59
+ fresh;实际获取时间不晚于 as_of 且不早于所需刷新;实际来源发布/截止字段达到要求;
60
+ TTL已知且严格晚于开盘;来源下一更新也严格晚于开盘。
61
+ 未声明所需输入、开盘、TTL、来源时刻或实际来源字段证据均不 ready。
62
+ 它不证明发布者已经交付全部真实业务数据、历史 PIT、全市场交易资格或下单权限。
63
+ 摘要固定带 `trading_authorization: false`。
64
+
65
+ 新 fetch receipt 保存实际采用的 `freshness_policy`(调用 max_age 或来源合同默认值),
66
+ 包括 cache mode;旧 receipt 缺少该字段时仍保持原序列化及身份,不推测 TTL。
67
+ 旧缓存经一次按当前策略成功 fetch 后,返回 receipt 才记录实际使用的策略。
68
+ 缓存仅在会话确实读取后纳入本摘要;不会扫描未加载的磁盘缓存。
69
+ `next_future_expiry` 返回已加载缓存记录中仍在未来的最早 TTL 截止时刻,跳过已过期和
70
+ cache=bypass;它不表示期货合约到期。快照读取不能证明缓存条目仍物理驻留。
71
+
72
+ 建议时刻根据声明的更新时刻与已知截止时刻计算,已过时的计划收敛到 as_of,
73
+ 不添加虚构缓冲分钟数。缺少所需来源计划时返回 None。它只是再检查来源的时刻,
74
+ 不会保证届时数据到账;应实际重新 fetch,再读摘要。ready 时同样返回 None,
75
+ 需结合 summary.ready 区分状态。
76
+
77
+ AsyncSession 使用 await 调同一实现。RemoteSession 仅检查本客户端已经收到的服务器
78
+ receipt;保留服务器 freshness_policy,不使用客户端目录替代服务器策略。
79
+ 旧服务器不传策略则 TTL unknown。不会请求或声称能观察服务器整个缓存。
80
+
81
+ 对应冻结 `finlab_documented_api.tsv.gz` 数据行 24、26、28(含表头物理行25、27、29),
82
+ SDK-002/005/007。参考 2.0.18 wheel 的公开 docstring 与
83
+ [当前官方说明](https://finlab.finance/docs/reference/data/);原库默认市场与固定估计缓冲
84
+ 不适用于 Axiolune 的多源合同,因此这里必须显式声明,不声称参数完全同名兼容。
axiolune/DOCUMENTS.md ADDED
@@ -0,0 +1,190 @@
1
+ # Document originals, parsing, citations and candidate claims
2
+
3
+ `Session.documents` stores explicitly authorized originals and traces quotations
4
+ back through an immutable parse to those exact bytes. It does not verify financial
5
+ facts, authenticate the supplied author label or promote claims into canonical M2.
6
+
7
+ Install `axiolune[documents]` for HTTP and optional PDF parsing. Local UTF-8 text,
8
+ HTML, JSON, CSV and TSV parsing uses the standard library. A PDF operation without
9
+ `pypdf` returns `ExtraRequired`; importing this module and restoring its existing
10
+ objects do not import PDF libraries or make network requests.
11
+
12
+ For a retained public PDF whose fonts or scanned pages cannot be read correctly
13
+ as text, the separate explicit [local PDF reading adapter](PDF-READING.md) consumes
14
+ the same original bytes or `SourceResult`. Its optional `ocr` extra provides
15
+ bounded PDFium/RapidOCR reading, coordinates, scores and uncertainty. This does
16
+ not change document evidence v1 or make `Session.documents.parse` perform OCR.
17
+
18
+ ```python
19
+ from axiolune import Session
20
+
21
+ rights = {
22
+ "access": "public",
23
+ "storage": "allowed",
24
+ "sharing": "unverified",
25
+ "basis": "https://www.federalreserve.gov/disclaimer.htm",
26
+ "scope": "Board-authored statement text for local research",
27
+ }
28
+ with Session(data_root="./research", network="enabled") as session:
29
+ original = session.documents.fetch(
30
+ "https://www.federalreserve.gov/monetarypolicy/files/monetary20240918a1.pdf",
31
+ rights=rights, format="pdf",
32
+ )
33
+ parsed = session.documents.parse(original.id)
34
+ fragments = session.documents.fragments(parsed.id)
35
+ # Inspect the actual returned text before selecting an excerpt.
36
+ fragment = fragments[0]
37
+ citation = session.documents.cite(
38
+ parsed.id, fragment_id=fragment["id"], start=0, end=10,
39
+ )
40
+ claim = session.documents.claim(
41
+ "My candidate interpretation of the cited passage.",
42
+ citations=[citation.id], author="Research notebook author",
43
+ )
44
+ assert claim.manifest["status"] == "candidate"
45
+ ```
46
+
47
+ The Federal Reserve Board's [copyright notice](https://www.federalreserve.gov/disclaimer.htm)
48
+ states that Board website information is generally public domain unless otherwise
49
+ marked, with separate restrictions for non-Board material and protected marks.
50
+ That basis applies to the explicitly selected Board statement. It is not a default
51
+ license for other source documents. This implementation grants no sharing or
52
+ external publication permission. Caller-supplied rights need permitted access,
53
+ `storage` equal to `allowed` or `permitted`, and a nonempty `basis`; a processing
54
+ denial also prevents use. Rights remain attached to the original, parse and
55
+ citation and are preserved per original in a claim's `source_rights`.
56
+
57
+ For an existing file, call
58
+ `import_file(path, rights=rights, format="text", source_uri=None)`. The default URI
59
+ is its absolute file URI; a supplied source URI lets a downloaded local copy retain
60
+ the same source identity. No rights are inferred from its presence on disk. HTTP
61
+ acquisition requires `network="enabled"` and reuses the session's bounded transport;
62
+ URL credentials, queries, fragments and control characters are rejected. HTTP
63
+ redirects are not followed. The exact requested original is retained; publication
64
+ time remains unknown instead of being inferred from acquisition time.
65
+
66
+ Every evidence result is an `EvidenceRecord` with `id`, deeply immutable `manifest`
67
+ and detached `to_dict()`. Original identity pins content, source URI, format and
68
+ rights. `content_version` is the original byte SHA-256. Identical bytes can share a
69
+ content object while distinct provenance or rights produce distinct original
70
+ records. Acquisition times live in separate append-only events, so re-reading the
71
+ same original does not invent a new content revision. Parses pin their algorithm,
72
+ Python version and optional pypdf version and have content-addressed fragment
73
+ objects. Explicitly parsing an original again with the same parser produces the
74
+ same parse ID. Old originals and parses remain addressable.
75
+
76
+ The v1 locators are explicit:
77
+
78
+ | Format | Fragment and coordinate |
79
+ | --- | --- |
80
+ | UTF-8 text | Original decoded line, one-based line number, zero-based decoded character offset; line endings retained |
81
+ | HTML | Nonempty text node, one-based source line and zero-based source column from `HTMLParser`; entities decoded, scripts/styles and whitespace-only nodes excluded |
82
+ | JSON | Scalar value, RFC 6901 pointer and value kind; numeric source lexemes remain strings and never pass through binary floating point |
83
+ | CSV / TSV | Every cell including headers and empty cells, one-based table/row/column and original physical line span; no type or header inference |
84
+ | PDF | One fragment per page, one-based page and offsets in its extracted text; empty pages carry a diagnostic |
85
+
86
+ A citation pins original ID, content version, parse ID, parser version, fragment
87
+ ID, locator and a nonempty half-open `[start, end)` range measured in Unicode code
88
+ points. It stores the exact parsed substring and its UTF-8 SHA-256. Readers verify
89
+ that substring against the persisted parse and verify the original byte digest.
90
+ HTML coordinates are parser source positions, not browser DOM locations. PDF
91
+ coordinates are page/text offsets, not visual bounding boxes. Parsed excerpts can
92
+ differ from raw-byte spelling, such as decoded HTML entities or JSON string escapes;
93
+ both parse and original remain available. Source text is untrusted data and cannot
94
+ authorize actions or override caller instructions.
95
+
96
+ To cite several inspected fragments from the same parse, use one bounded group:
97
+
98
+ ```python
99
+ citations = session.documents.cite_many(
100
+ parsed.id,
101
+ selections=[
102
+ {"fragment_id": first_fragment_id, "start": 0, "end": None},
103
+ {"fragment_id": second_fragment_id, "start": 0, "end": excerpt_end},
104
+ ],
105
+ )
106
+ ```
107
+
108
+ Every selection has exactly `fragment_id`, `start` and `end`; coordinates are
109
+ integers, and `end=None` means the fragment's end. Empty/duplicate selections,
110
+ invalid ranges, extra fields and groups exceeding the Session row/byte budget
111
+ are rejected. Selection count and shape are checked before building a group.
112
+ The group returns a tuple of the existing `EvidenceRecord` type in input order.
113
+ `AsyncSession.documents.cite_many` forwards through the same async worker lane.
114
+
115
+ `cite` and `cite_many` share one manifest construction and validation path.
116
+ Single-citation manifests, IDs, schema and the `cite` event operation stay
117
+ compatible. A group holds one SQLite write transaction: the parse/raw closure is
118
+ verified once using that transaction's bounded object cache, and every citation
119
+ still rereads its own actual SQL index and immutable content through `_record`.
120
+ Only previously verified common parents are reused. The cache is discarded when
121
+ the transaction ends. All indices and each citation's `succeeded` event commit
122
+ together; group events share an attempt ID and carry batch size/index. A failure
123
+ rolls back the entire group and its success events. Unreferenced objects can
124
+ remain, and the real failed attempt is recorded separately. No half-group result
125
+ is returned and no cache spans calls.
126
+
127
+ `get(document_id)` reads verified original metadata; `original_bytes(document_id)`
128
+ returns the exact original. `parsed(parse_id)` returns parse metadata and
129
+ `fragments(parse_id)` returns deeply immutable fragments. `citation(citation_id)`
130
+ and `get_claim(claim_id)` validate their complete dependency closure. A revised
131
+ claim uses `previous_claim_id`; the old claim remains intact. Claims always remain
132
+ `candidate`, authors are explicitly `caller_asserted`, and no verification command
133
+ is provided. Reference chains have a 128-level limit and reject cycles.
134
+
135
+ `history(subject_id=None)` returns the actual append-only lifecycle events. A
136
+ subject filter includes the entire matching attempt, so its start and terminal
137
+ event can be reviewed together. A start without a terminal event means the outcome
138
+ is unknown; reading history does not update it, invent success or resume network
139
+ activity. Retry by explicitly invoking a new operation. Missing files, corrupted
140
+ objects, denied rights, parser failures and budget failures remain distinguishable.
141
+ Metadata-only invalid credential URLs are rejected before any secret-bearing URL
142
+ can enter a stored event.
143
+
144
+ The existing `SnapshotStore` owns all bytes under `objects/<prefix>/<sha256>` and
145
+ all five `document_*` tables under `control.sqlite3`. Mutations write and verify
146
+ objects before a single SQLite transaction inserts the evidence index and success
147
+ event. A failure can leave an unreferenced immutable object, but it cannot publish
148
+ a successful original or replace an older version. Start/failure audit events are
149
+ separate commits. Small control-event overhead is separate from payload budgets
150
+ except that `cite`/`cite_many` also budget their start and success event payloads;
151
+ failure cleanup records remain separate bounded control events.
152
+ Reads honor session byte/row/deadline/cancellation limits. Parser output growth,
153
+ JSON depth, PDF page count and decoded page-stream size are checked; in-process PDF
154
+ extraction is not a hard operating-system memory or CPU sandbox. It performs no OCR
155
+ and makes no promise that PDF reading order is visually faithful.
156
+
157
+ Recovery uses the pure read-only `document_object_closure(connection, store)` hook
158
+ and the exported `DOCUMENT_TABLE_COLUMNS` exact column inventory. All DB lookups
159
+ use the supplied fixed SQLite view; only immutable object reads use the store. A
160
+ fully absent document table group is valid; a partially present group is rejected.
161
+ The hook verifies original/parse/citation/claim/event references and does not load
162
+ optional parsers or change lifecycle state.
163
+
164
+ The CLI mirrors these operations:
165
+
166
+ ```text
167
+ axiolune documents import-file PATH --format pdf --rights-file rights.json --data-root ROOT
168
+ axiolune documents parse DOCUMENT_ID --data-root ROOT
169
+ axiolune documents fragments PARSE_ID --data-root ROOT
170
+ axiolune documents cite PARSE_ID --fragment-id 0 --start 0 --end 10 --data-root ROOT
171
+ axiolune documents claim --text-file claim.txt --citations-file citations.json --author AUTHOR --data-root ROOT
172
+ axiolune documents get-claim CLAIM_ID --data-root ROOT
173
+ axiolune documents history --subject-id DOCUMENT_ID --data-root ROOT
174
+ ```
175
+
176
+ `citations.json` is an array of committed citation IDs. The CLI does not write raw
177
+ document bytes to stdout. `AsyncSession.documents` exposes the same contracts and
178
+ checks the same session lifetime. No local document API creates team publication
179
+ or a shared permission grant implicitly.
180
+
181
+ Actual validation is implemented in `validation/document_evidence.py`. It fetches
182
+ the Board's [HTML statement](https://www.federalreserve.gov/newsevents/pressreleases/monetary20240918a.htm)
183
+ and [four-page PDF](https://www.federalreserve.gov/monetarypolicy/files/monetary20240918a1.pdf),
184
+ reconciles their exact excerpts, reads retained real FX source data plus repository
185
+ engineering text/TSV, exercises genuine parse/missing/corruption failures, and
186
+ checks SQLite recovery, CLI and async paths. This establishes only the reported
187
+ format and evidence behaviors, not general provider qualification or financial
188
+ truth. Parser APIs follow official [HTMLParser](https://docs.python.org/3/library/html.parser.html),
189
+ [pypdf extraction](https://pypdf.readthedocs.io/en/stable/user/extract-text.html)
190
+ and [HTTPX](https://www.python-httpx.org/quickstart/) documentation.
axiolune/ECB-EST.md ADDED
@@ -0,0 +1,30 @@
1
+ # ECB €STR 的获取与离线使用
2
+
3
+ `ecb.euro_short_term_rate` 使用 ECB 的 EST CSV 接口,保留全部源列和原始文本值。已有的 `Session.data.fetch`、缓存、快照、Parquet 导出和 SQL 读取共同处理此产品,无需另装 ECB 客户端。
4
+
5
+ 以下函数由调用者明确指定日期与存储位置。`B.EU000A2X2A25.WT` 是本次实际验证的 €STR 利率系列键;其他系列仍须按 ECB EST 目录选择,不由包猜测。
6
+
7
+ ```python
8
+ from axiolune import Session
9
+
10
+ def retain_estr(data_root, start_date, end_date, export_path):
11
+ parameters = {
12
+ "series_key": "B.EU000A2X2A25.WT",
13
+ "startPeriod": start_date,
14
+ "endPeriod": end_date,
15
+ }
16
+ with Session.local(data_root=data_root, network="enabled") as session:
17
+ result = session.data.fetch(
18
+ "ecb.euro_short_term_rate", params=parameters, cache="refresh"
19
+ )
20
+ snapshot = session.snapshots.freeze(result)
21
+ result.export(export_path) # .parquet;旁文件保留来源及权利条件
22
+ with Session.local(data_root=data_root, network="offline") as session:
23
+ return session.data.read(snapshot.id)
24
+ ```
25
+
26
+ 已验证窗口为 2026-01-01 至 2026-09-11:177 行、29 列,CSV 的 5,133 个字段值与 Arrow、pandas、Polars、Parquet 和断网读取一致。利率原值以文本保留,计算时应显式声明 Decimal 类型和单位。目录中的旧获取证据仍指向原先那次请求;本次新获取和实际留存见 a13 的独立验证记录。
27
+
28
+ EST 元数据明确其发布来源为 ECB,并区分交易参考日期与次一营业日的发布时间。`TIME_PERIOD` 不能直接当作历史可知时刻;此产品的 source 读取不会自动取得严格研究或 PIT 资格。[ECB EST 说明](https://data.ecb.europa.eu/data/datasets/EST/data-information)
29
+
30
+ 留存与共享依据是 ECB 统计再使用政策及其声明。使用时须准确保留原统计和元数据并标明来源;派生计算须说明是使用者的计算。付费文档另须按声明提示原信息可从 ECB 免费获得。receipt 保存条款链接、条件和实取官方材料的摘要;EXR/FM 及第三方数据不因本次核对而取得授权。[再使用政策](https://www.ecb.europa.eu/stats/ecb_statistics/governance_and_quality_framework/html/usage_policy.en.html)、[版权与使用声明](https://www.ecb.europa.eu/services/using-our-site/disclaimer/html/index.en.html)、[€STR 声明](https://www.ecb.europa.eu/stats/financial_markets_and_interest_rates/euro_short-term_rate/html/index.en.html)