oracle3 1.2.2__tar.gz → 1.3.0__tar.gz

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 (178) hide show
  1. oracle3-1.3.0/PKG-INFO +209 -0
  2. oracle3-1.3.0/README.md +138 -0
  3. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/__init__.py +1 -1
  4. oracle3-1.3.0/oracle3/analytics/performance_analyzer.py +510 -0
  5. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/arbitrage.py +41 -7
  6. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/cli/cli.py +67 -25
  7. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/cli/research_commands.py +129 -76
  8. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/core/trading_engine.py +195 -47
  9. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/fees.py +67 -17
  10. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/live/live_trader.py +34 -1
  11. oracle3-1.3.0/oracle3/mcp_server/paper.py +478 -0
  12. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/mcp_server/server.py +85 -12
  13. oracle3-1.3.0/oracle3/ml/__init__.py +13 -0
  14. oracle3-1.3.0/oracle3/ml/ablation.py +100 -0
  15. oracle3-1.3.0/oracle3/ml/benchmark.py +587 -0
  16. oracle3-1.3.0/oracle3/ml/bundle/isotonic.json +1 -0
  17. oracle3-1.3.0/oracle3/ml/bundle/manifest.json +111 -0
  18. oracle3-1.3.0/oracle3/ml/bundle/model.txt +4516 -0
  19. oracle3-1.3.0/oracle3/ml/collect.py +913 -0
  20. oracle3-1.3.0/oracle3/ml/cv.py +134 -0
  21. oracle3-1.3.0/oracle3/ml/dataset.py +181 -0
  22. oracle3-1.3.0/oracle3/ml/features.py +254 -0
  23. oracle3-1.3.0/oracle3/ml/metrics.py +93 -0
  24. oracle3-1.3.0/oracle3/ml/models.py +399 -0
  25. oracle3-1.3.0/oracle3/ml/report.py +376 -0
  26. oracle3-1.3.0/oracle3/ml/serve.py +407 -0
  27. oracle3-1.3.0/oracle3/ml/sources.py +195 -0
  28. oracle3-1.3.0/oracle3/ml/taxonomy.py +235 -0
  29. oracle3-1.3.0/oracle3/position/position_manager.py +242 -0
  30. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/pricing/fair_value.py +84 -19
  31. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/risk/risk_manager.py +15 -0
  32. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/storage/serializers.py +42 -0
  33. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/storage/state_store.py +59 -22
  34. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/agent_strategy.py +133 -26
  35. oracle3-1.3.0/oracle3/strategy/contrib/basket_execution.py +384 -0
  36. oracle3-1.3.0/oracle3/strategy/contrib/conditional_arb_strategy.py +120 -0
  37. oracle3-1.3.0/oracle3/strategy/contrib/event_sum_arb_strategy.py +328 -0
  38. oracle3-1.3.0/oracle3/strategy/contrib/exclusivity_arb_strategy.py +78 -0
  39. oracle3-1.3.0/oracle3/strategy/contrib/implication_arb_strategy.py +79 -0
  40. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/contrib/solana_agent_strategy.py +35 -16
  41. oracle3-1.3.0/oracle3/strategy/contrib/structural_arb_strategy.py +117 -0
  42. oracle3-1.3.0/oracle3/strategy/fee_utils.py +118 -0
  43. oracle3-1.3.0/oracle3/trader/kalshi_trader.py +296 -0
  44. oracle3-1.3.0/oracle3/trader/order_journal.py +102 -0
  45. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/trader/paper_trader.py +72 -32
  46. oracle3-1.3.0/oracle3/trader/polymarket_trader.py +282 -0
  47. oracle3-1.3.0/oracle3/trader/spread_executor.py +396 -0
  48. oracle3-1.3.0/oracle3/trader/trader.py +522 -0
  49. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/trader/types.py +55 -2
  50. {oracle3-1.2.2 → oracle3-1.3.0}/pyproject.toml +15 -3
  51. oracle3-1.2.2/PKG-INFO +0 -275
  52. oracle3-1.2.2/README.md +0 -215
  53. oracle3-1.2.2/oracle3/analytics/performance_analyzer.py +0 -336
  54. oracle3-1.2.2/oracle3/mcp_server/paper.py +0 -157
  55. oracle3-1.2.2/oracle3/position/position_manager.py +0 -189
  56. oracle3-1.2.2/oracle3/strategy/contrib/conditional_arb_strategy.py +0 -365
  57. oracle3-1.2.2/oracle3/strategy/contrib/event_sum_arb_strategy.py +0 -251
  58. oracle3-1.2.2/oracle3/strategy/contrib/exclusivity_arb_strategy.py +0 -290
  59. oracle3-1.2.2/oracle3/strategy/contrib/implication_arb_strategy.py +0 -277
  60. oracle3-1.2.2/oracle3/strategy/contrib/structural_arb_strategy.py +0 -357
  61. oracle3-1.2.2/oracle3/trader/kalshi_trader.py +0 -296
  62. oracle3-1.2.2/oracle3/trader/polymarket_trader.py +0 -356
  63. oracle3-1.2.2/oracle3/trader/spread_executor.py +0 -308
  64. oracle3-1.2.2/oracle3/trader/trader.py +0 -136
  65. {oracle3-1.2.2 → oracle3-1.3.0}/LICENSE +0 -0
  66. {oracle3-1.2.2 → oracle3-1.3.0}/NOTICE +0 -0
  67. {oracle3-1.2.2 → oracle3-1.3.0}/coinjure/__init__.py +0 -0
  68. {oracle3-1.2.2 → oracle3-1.3.0}/coinjure/matching/__init__.py +0 -0
  69. {oracle3-1.2.2 → oracle3-1.3.0}/coinjure/matching/_cache.py +0 -0
  70. {oracle3-1.2.2 → oracle3-1.3.0}/coinjure/matching/_category.py +0 -0
  71. {oracle3-1.2.2 → oracle3-1.3.0}/coinjure/matching/_date.py +0 -0
  72. {oracle3-1.2.2 → oracle3-1.3.0}/coinjure/matching/_fetchers.py +0 -0
  73. {oracle3-1.2.2 → oracle3-1.3.0}/coinjure/matching/_pipeline.py +0 -0
  74. {oracle3-1.2.2 → oracle3-1.3.0}/coinjure/matching/_resolution.py +0 -0
  75. {oracle3-1.2.2 → oracle3-1.3.0}/coinjure/matching/_template.py +0 -0
  76. {oracle3-1.2.2 → oracle3-1.3.0}/coinjure/matching/_text.py +0 -0
  77. {oracle3-1.2.2 → oracle3-1.3.0}/coinjure/matching/_types.py +0 -0
  78. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/agent/__init__.py +0 -0
  79. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/agent/coordinator.py +0 -0
  80. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/alerts/__init__.py +0 -0
  81. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/alerts/alerter.py +0 -0
  82. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/alerts/telegram_alerter.py +0 -0
  83. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/backtest/backtester.py +0 -0
  84. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/blinks/__init__.py +0 -0
  85. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/blinks/generator.py +0 -0
  86. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/blinks/server.py +0 -0
  87. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/cli/__init__.py +0 -0
  88. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/cli/agent_commands.py +0 -0
  89. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/cli/control.py +0 -0
  90. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/cli/data_commands.py +0 -0
  91. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/cli/market_commands.py +0 -0
  92. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/cli/monitor.py +0 -0
  93. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/cli/news_commands.py +0 -0
  94. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/cli/textual_monitor.py +0 -0
  95. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/cli/trade_commands.py +0 -0
  96. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/cli/utils.py +0 -0
  97. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/config/__init__.py +0 -0
  98. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/config/config.py +0 -0
  99. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/dashboard/__init__.py +0 -0
  100. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/dashboard/server.py +0 -0
  101. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/dashboard/static/demo.html +0 -0
  102. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/dashboard/static/index.html +0 -0
  103. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/dashboard/static/live.html +0 -0
  104. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/backtest/dflow_recorder.py +0 -0
  105. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/backtest/historical_data_source.py +0 -0
  106. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/backtest/history_reader.py +0 -0
  107. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/backtest/kalshi_replay_data_source.py +0 -0
  108. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/base_fetcher.py +0 -0
  109. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/composite_data_source.py +0 -0
  110. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/data_source.py +0 -0
  111. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/live/coingecko_x402_data_source.py +0 -0
  112. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/live/dflow_data_source.py +0 -0
  113. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/live/dflow_ws_data_source.py +0 -0
  114. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/live/google_news_data_source.py +0 -0
  115. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/live/kalshi_data_source.py +0 -0
  116. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/live/live_data_source.py +0 -0
  117. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/live/onchain_signal_source.py +0 -0
  118. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/live/polymarket_orderflow.py +0 -0
  119. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/live/twitter_fetcher.py +0 -0
  120. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/market_data_manager.py +0 -0
  121. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/preprocessing/__init__.py +0 -0
  122. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/data/preprocessing/news_processor.py +0 -0
  123. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/engine/__init__.py +0 -0
  124. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/engine/control.py +0 -0
  125. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/engine/registry.py +0 -0
  126. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/events/events.py +0 -0
  127. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/experimental/__init__.py +0 -0
  128. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/experimental/flash_loan.py +0 -0
  129. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/market/__init__.py +0 -0
  130. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/market/relations.py +0 -0
  131. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/market/validation.py +0 -0
  132. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/mcp_server/__init__.py +0 -0
  133. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/mcp_server/__main__.py +0 -0
  134. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/mcp_server/venues.py +0 -0
  135. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/mock/__init__.py +0 -0
  136. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/mock/mock_mode.py +0 -0
  137. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/onchain/__init__.py +0 -0
  138. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/onchain/logger.py +0 -0
  139. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/onchain/reputation.py +0 -0
  140. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/order/order_book.py +0 -0
  141. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/pricing/__init__.py +0 -0
  142. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/pricing/calibrator.py +0 -0
  143. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/pricing/contract_scorer.py +0 -0
  144. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/pricing/distortion.py +0 -0
  145. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/pricing/greeks.py +0 -0
  146. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/pricing/premium_tracker.py +0 -0
  147. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/pricing/wang_mle.py +0 -0
  148. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/risk/correlation_risk_manager.py +0 -0
  149. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/risk/onchain_risk_manager.py +0 -0
  150. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/storage/__init__.py +0 -0
  151. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/__init__.py +0 -0
  152. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/contrib/__init__.py +0 -0
  153. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/contrib/adaptive_onchain_strategy.py +0 -0
  154. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/contrib/allocation_strategy.py +0 -0
  155. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/contrib/coint_spread_strategy.py +0 -0
  156. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/contrib/cross_market_arbitrage_strategy.py +0 -0
  157. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/contrib/debate_strategy.py +0 -0
  158. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/contrib/fair_value_strategy.py +0 -0
  159. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/contrib/lead_lag_strategy.py +0 -0
  160. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/contrib/llm_news_strategy.py +0 -0
  161. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/contrib/multi_agent_strategy.py +0 -0
  162. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/contrib/premium_decay_strategy.py +0 -0
  163. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/contrib/prompts.py +0 -0
  164. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/loader.py +0 -0
  165. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/market_making_strategy.py +0 -0
  166. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/momentum_mean_reversion_strategy.py +0 -0
  167. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/orderbook_imbalance_strategy.py +0 -0
  168. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/quant_strategy.py +0 -0
  169. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/simple_strategy.py +0 -0
  170. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/strategy.py +0 -0
  171. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/strategy/test_strategy.py +0 -0
  172. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/ticker/ticker.py +0 -0
  173. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/trader/atomic_trader.py +0 -0
  174. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/trader/jito_submitter.py +0 -0
  175. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/trader/solana_trader.py +0 -0
  176. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/trading/__init__.py +0 -0
  177. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/trading/allocator.py +0 -0
  178. {oracle3-1.2.2 → oracle3-1.3.0}/oracle3/trading/sizing.py +0 -0
oracle3-1.3.0/PKG-INFO ADDED
@@ -0,0 +1,209 @@
1
+ Metadata-Version: 2.4
2
+ Name: oracle3
3
+ Version: 1.3.0
4
+ Summary: Agent tools and execution infrastructure for prediction markets: Kalshi and Polymarket data, fee-aware contract checks, local paper trading and execution regression through MCP and Python.
5
+ License: Apache-2.0
6
+ License-File: LICENSE
7
+ License-File: NOTICE
8
+ Keywords: prediction-markets,kalshi,polymarket,arbitrage,no-arbitrage,event-contracts,paper-trading,mcp-server,ai-agents,algorithmic-trading,quantitative-finance,market-microstructure,risk-management
9
+ Author: Yicheng Yang
10
+ Author-email: yy85@illinois.edu
11
+ Requires-Python: >=3.10,<4.0
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Financial and Insurance Industry
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: License :: OSI Approved :: Apache Software License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
+ Classifier: Programming Language :: Python :: 3.15
25
+ Classifier: Topic :: Office/Business :: Financial :: Investment
26
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
27
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
28
+ Classifier: Typing :: Typed
29
+ Provides-Extra: blinks
30
+ Provides-Extra: llm
31
+ Provides-Extra: ml
32
+ Provides-Extra: ml-bench
33
+ Requires-Dist: beartype (>=0.22.9,<0.23.0)
34
+ Requires-Dist: beautifulsoup4 (>=4.12.0)
35
+ Requires-Dist: catboost (>=1.2) ; extra == "ml-bench"
36
+ Requires-Dist: click (>=8.1.7,<9.0.0)
37
+ Requires-Dist: cryptography
38
+ Requires-Dist: fastapi (>=0.100.0) ; extra == "blinks"
39
+ Requires-Dist: feedparser (>=6.0.0)
40
+ Requires-Dist: httpx (>=0.24.0)
41
+ Requires-Dist: joblib (>=1.3) ; extra == "ml" or extra == "ml-bench"
42
+ Requires-Dist: kalshi-python
43
+ Requires-Dist: lightgbm (>=4.0) ; extra == "ml" or extra == "ml-bench"
44
+ Requires-Dist: litellm (>=1.0.0) ; extra == "llm"
45
+ Requires-Dist: mcp (>=1.19,<3)
46
+ Requires-Dist: numpy (>=1.24) ; extra == "ml" or extra == "ml-bench"
47
+ Requires-Dist: openai (>=1.0.0)
48
+ Requires-Dist: openai-agents
49
+ Requires-Dist: pandas (>=2.0) ; extra == "ml" or extra == "ml-bench"
50
+ Requires-Dist: py-clob-client
51
+ Requires-Dist: pyarrow (>=14) ; extra == "ml" or extra == "ml-bench"
52
+ Requires-Dist: pydantic (>=2.8.2,<3.0.0)
53
+ Requires-Dist: requests (>=2.28.0)
54
+ Requires-Dist: rich (>=13.7.0,<14.0.0)
55
+ Requires-Dist: scikit-learn (>=1.3) ; extra == "ml" or extra == "ml-bench"
56
+ Requires-Dist: scipy (>=1.10) ; extra == "ml" or extra == "ml-bench"
57
+ Requires-Dist: solana (>=0.34.0)
58
+ Requires-Dist: solders (>=0.21.0)
59
+ Requires-Dist: tenacity (>=8.2.0)
60
+ Requires-Dist: textual (>=0.50.0)
61
+ Requires-Dist: uvicorn (>=0.20.0) ; extra == "blinks"
62
+ Requires-Dist: xgboost (>=2.0) ; extra == "ml-bench"
63
+ Project-URL: Changelog, https://github.com/YichengYang-Ethan/oracle3-prediction-market-agent/blob/main/CHANGELOG.md
64
+ Project-URL: Documentation, https://yichengyang-ethan.github.io/oracle3-prediction-market-agent/
65
+ Project-URL: Homepage, https://yichengyang-ethan.github.io/oracle3-prediction-market-agent/
66
+ Project-URL: Issues, https://github.com/YichengYang-Ethan/oracle3-prediction-market-agent/issues
67
+ Project-URL: Paper, https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6468338
68
+ Project-URL: Repository, https://github.com/YichengYang-Ethan/oracle3-prediction-market-agent
69
+ Description-Content-Type: text/markdown
70
+
71
+ <!-- mcp-name: io.github.YichengYang-Ethan/oracle3 -->
72
+
73
+ # Oracle3
74
+
75
+ **Build prediction-market agents that discover markets, analyze opportunities, and test strategies.**
76
+
77
+ Connect AI agents to Kalshi and Polymarket through MCP. Give them reusable Skills for market research and strategy development, then build on a Python engine for paper and live execution.
78
+
79
+ **14 MCP tools · 6 agent Skills · Kalshi & Polymarket data · Python 3.10+**
80
+
81
+ [![Tests](https://github.com/YichengYang-Ethan/oracle3-prediction-market-agent/actions/workflows/pytest.yml/badge.svg)](https://github.com/YichengYang-Ethan/oracle3-prediction-market-agent/actions/workflows/pytest.yml)
82
+ [![GitHub stars](https://img.shields.io/github/stars/YichengYang-Ethan/oracle3-prediction-market-agent?style=social)](https://github.com/YichengYang-Ethan/oracle3-prediction-market-agent/stargazers)
83
+ [![PyPI](https://img.shields.io/pypi/v/oracle3)](https://pypi.org/project/oracle3/)
84
+ [![License](https://img.shields.io/badge/license-Apache%202.0-green)](LICENSE)
85
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.20062548.svg)](https://doi.org/10.5281/zenodo.20062548)
86
+
87
+ [Quickstart](#quickstart) · [MCP tools](docs/mcp.md) · [Agent Skills](#reusable-agent-skills) · [Project and contributions](docs/research-review.md) · [Documentation](https://yichengyang-ethan.github.io/oracle3-prediction-market-agent/)
88
+
89
+ ## Why Oracle3
90
+
91
+ - **A connected research workflow.** Discover contracts, inspect their rules and order books, compare related outcomes, and track simulated positions.
92
+ - **Calculations that include trading costs.** Five relationship checks return candidate baskets, per-leg fees, and calculated net edge.
93
+ - **Tools and workflows for agents.** Use MCP for structured access and Skills for repeatable research, strategy authoring, and operations.
94
+ - **An engine you can extend.** Build strategies with Python interfaces, risk controls, and paper/live venue adapters.
95
+ - **A foundation for experiments.** Reproducible software checks, automated tests, and installed-package validation make the implementation inspectable.
96
+
97
+ Public Kalshi and Polymarket market reads need no exchange credentials. MCP provides market data, calculations, and a local paper ledger; real-order execution uses the separate CLI/Python engine.
98
+
99
+ ## Quickstart
100
+
101
+ Install the current development checkout:
102
+
103
+ ```bash
104
+ git clone https://github.com/YichengYang-Ethan/oracle3-prediction-market-agent.git
105
+ cd oracle3-prediction-market-agent
106
+ python -m venv .venv
107
+ .venv/bin/python -m pip install -e .
108
+ ```
109
+
110
+ Connect it to Claude Code from this directory:
111
+
112
+ ```bash
113
+ claude mcp add oracle3 -- "$PWD/.venv/bin/oracle3-mcp"
114
+ ```
115
+
116
+ For other MCP clients, configure the absolute path to `.venv/bin/oracle3-mcp` as the command with an empty argument list. On Windows, use `.venv\Scripts\python.exe` and `.venv\Scripts\oracle3-mcp.exe`.
117
+
118
+ [Client configuration and first tool call](docs/agent-quickstart.md) · [Published-package installation](docs/mcp.md)
119
+
120
+ ### Give your agent a first task
121
+
122
+ > Find Kalshi and Polymarket contracts about the next Fed rate decision. Compare their outcome definitions, resolution rules, and order-book quotes. Summarize the markets with their IDs, prices, and the assumptions needed to compare them.
123
+
124
+ For a calculation that works offline after installation:
125
+
126
+ > Use Oracle3 to check an implication: A implies B. A has a YES bid of $0.60 and B has a YES ask of $0.55. Use the default Kalshi taker fee schedule and 100 contracts per leg. Show the basket, gross edge, fees, and net edge.
127
+
128
+ The synthetic example returns **$5.00 gross edge − $3.4125 fees = $1.5875 calculated net edge**, conditional on the supplied implication and quotes. [See exact inputs and output](docs/agent-quickstart.md#first-call-a-deterministic-fee-check).
129
+
130
+ ## What agents can do
131
+
132
+ | Task | Tools | Result |
133
+ |---|---|---|
134
+ | Discover markets | `search_markets`, `get_market` | Contracts, metadata, and available resolution rules |
135
+ | Inspect market conditions | `get_quote`, `get_orderbook` | Prices, fee information, and displayed depth |
136
+ | Analyze related contracts | `check_constraint`, `check_constraint_live` | Baskets and net edge under a stated relationship |
137
+ | Calculate fees and model values | `trading_fee`, `fair_value` | Fee estimates and parameterized model outputs |
138
+ | Get a calibrated probability | `model_probability` | A machine-learning probability next to the market price, with the model's out-of-sample scores ([how it was built and tested](docs/ml.md)) |
139
+ | Try a paper entry | `paper_order`, `paper_portfolio` | Simulated fills and holdings in a local ledger |
140
+
141
+ Relationship checks cover **implication, exclusivity, complement, same event, and event sum**. They expose assumptions with their results, giving agents and researchers a common calculation layer.
142
+
143
+ [All 14 MCP tools](docs/mcp.md) · [Workflow examples](docs/agent-quickstart.md)
144
+
145
+ ## Reusable agent Skills
146
+
147
+ The repository includes six workflows that help agents move from individual tool calls to complete tasks:
148
+
149
+ | Skill | Use it to |
150
+ |---|---|
151
+ | [Data discovery](skills/pm-data-discovery/SKILL.md) | Find markets and organize research inputs |
152
+ | [Constraint arbitrage](skills/pm-constraint-arbitrage/SKILL.md) | Examine related contracts and calculate fee-aware baskets |
153
+ | [Quant strategy authoring](skills/pm-quant-strategy-authoring/SKILL.md) | Develop strategies with Oracle3's Python interfaces |
154
+ | [Agent strategy authoring](skills/pm-agent-strategy-authoring/SKILL.md) | Build agent-driven decision workflows |
155
+ | [Paper operations](skills/pm-paper-trade-ops/SKILL.md) | Run and inspect simulated trading sessions |
156
+ | [Live operations](skills/pm-live-trade-ops/SKILL.md) | Configure and operate the separate live engine |
157
+
158
+ Claude Code project copies are included in [`.claude/skills/`](.claude/skills/). Open the checkout as your project, or use your client's supported Skill installation mechanism. [Skill setup](docs/agent-quickstart.md#agent-skills).
159
+
160
+ **For AI agents:** start with [`llms.txt`](llms.txt) for task routing, the [MCP reference](docs/mcp.md) for tool schemas, and [`AGENTS.md`](AGENTS.md) for contributing code.
161
+
162
+ ## Build with Python and the CLI
163
+
164
+ Use the same project for research scripts, agent strategies, and engine operations:
165
+
166
+ ```bash
167
+ .venv/bin/oracle3 market search --exchange kalshi --query "fed" --json
168
+ .venv/bin/oracle3 market search --exchange polymarket --query "fed decision" --json
169
+ ```
170
+
171
+ | Component | Build with it |
172
+ |---|---|
173
+ | [MCP server](oracle3/mcp_server/) | Structured market access and local paper operations for agents |
174
+ | [Relations and fees](oracle3/arbitrage.py) | Shared calculations for related-contract strategies |
175
+ | [Strategies](oracle3/strategy/) | Logical-relation, statistical, and model-driven approaches |
176
+ | [Trading engine](oracle3/trader/) | Paper/live adapters for Kalshi, Polymarket, and Solana via DFlow |
177
+ | [Pricing](oracle3/pricing/) | Wang-transform models and estimators for research |
178
+ | [oracle3-extras](https://github.com/YichengYang-Ethan/oracle3-extras) | Optional venue, data-provider, and wallet integrations |
179
+
180
+ [CLI guide](docs/CLI_MONITORING.md) · [Integration guide](docs/extras.md) · [Execution reference](docs/runtime-integrity.md)
181
+
182
+ ## Built for experimentation
183
+
184
+ Oracle3 combines a concrete decision environment with structured tools, observable state, and a software validation harness. This supports work on agent interfaces, workflow guidance, and reproducible evaluation.
185
+
186
+ [CI](https://github.com/YichengYang-Ethan/oracle3-prediction-market-agent/actions/workflows/pytest.yml) runs automated tests and checks the built package through real MCP sessions on SDK 1.x and 2.x. The [harness documentation](docs/agent-harness.md) explains the reproducible checks. Model-level agent evaluation is a next research direction.
187
+
188
+ [Project overview and Yicheng Yang's contributions](docs/research-review.md) · [Fee-frontier study](docs/research/fee-frontier.md) · [Companion pricing research](https://github.com/YichengYang-Ethan/prediction-market-pricing)
189
+
190
+ ## Contribute
191
+
192
+ Help build better agent workflows, labeled evaluation tasks, strategy examples, and client integrations. New venue, data-provider, and wallet integrations start in [oracle3-extras](https://github.com/YichengYang-Ethan/oracle3-extras).
193
+
194
+ [Contributing guide](.github/CONTRIBUTING.md) · [Open problems](https://github.com/YichengYang-Ethan/oracle3-prediction-market-agent/issues?q=is%3Aissue+label%3Aopen-problem) · [Discussions](https://github.com/YichengYang-Ethan/oracle3-prediction-market-agent/discussions)
195
+
196
+ ## Origin and attribution
197
+
198
+ Oracle3 began as `ulab-uiuc/oracle3`, developed by Yicheng Yang and Haofei Yu at U Lab (University of Illinois Urbana-Champaign). It also bundles the lab's [Coinjure](https://github.com/ulab-uiuc/coinjure) package. Yicheng Yang continues to develop and maintain the extensions in this repository. [Read the project story and contributions](docs/research-review.md).
199
+
200
+ We acknowledge the foundational work of the Coinjure team at the University of Illinois Urbana-Champaign—Haofei Yu, Yicheng Yang, Yuxiang Liu, and Prof. Jiaxuan You—on which Oracle3 builds.
201
+
202
+ For software citation, use [CITATION.cff](CITATION.cff) and [Zenodo](https://doi.org/10.5281/zenodo.20062548). For the pricing model, see the [working paper](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6468338).
203
+
204
+ ## License
205
+
206
+ Apache 2.0; see [LICENSE](LICENSE). Original U Lab and Coinjure portions retain their MIT license in [NOTICE](NOTICE).
207
+
208
+ *This software is for research and education. Trading involves financial risk.*
209
+
@@ -0,0 +1,138 @@
1
+ <!-- mcp-name: io.github.YichengYang-Ethan/oracle3 -->
2
+
3
+ # Oracle3
4
+
5
+ **Build prediction-market agents that discover markets, analyze opportunities, and test strategies.**
6
+
7
+ Connect AI agents to Kalshi and Polymarket through MCP. Give them reusable Skills for market research and strategy development, then build on a Python engine for paper and live execution.
8
+
9
+ **14 MCP tools · 6 agent Skills · Kalshi & Polymarket data · Python 3.10+**
10
+
11
+ [![Tests](https://github.com/YichengYang-Ethan/oracle3-prediction-market-agent/actions/workflows/pytest.yml/badge.svg)](https://github.com/YichengYang-Ethan/oracle3-prediction-market-agent/actions/workflows/pytest.yml)
12
+ [![GitHub stars](https://img.shields.io/github/stars/YichengYang-Ethan/oracle3-prediction-market-agent?style=social)](https://github.com/YichengYang-Ethan/oracle3-prediction-market-agent/stargazers)
13
+ [![PyPI](https://img.shields.io/pypi/v/oracle3)](https://pypi.org/project/oracle3/)
14
+ [![License](https://img.shields.io/badge/license-Apache%202.0-green)](LICENSE)
15
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.20062548.svg)](https://doi.org/10.5281/zenodo.20062548)
16
+
17
+ [Quickstart](#quickstart) · [MCP tools](docs/mcp.md) · [Agent Skills](#reusable-agent-skills) · [Project and contributions](docs/research-review.md) · [Documentation](https://yichengyang-ethan.github.io/oracle3-prediction-market-agent/)
18
+
19
+ ## Why Oracle3
20
+
21
+ - **A connected research workflow.** Discover contracts, inspect their rules and order books, compare related outcomes, and track simulated positions.
22
+ - **Calculations that include trading costs.** Five relationship checks return candidate baskets, per-leg fees, and calculated net edge.
23
+ - **Tools and workflows for agents.** Use MCP for structured access and Skills for repeatable research, strategy authoring, and operations.
24
+ - **An engine you can extend.** Build strategies with Python interfaces, risk controls, and paper/live venue adapters.
25
+ - **A foundation for experiments.** Reproducible software checks, automated tests, and installed-package validation make the implementation inspectable.
26
+
27
+ Public Kalshi and Polymarket market reads need no exchange credentials. MCP provides market data, calculations, and a local paper ledger; real-order execution uses the separate CLI/Python engine.
28
+
29
+ ## Quickstart
30
+
31
+ Install the current development checkout:
32
+
33
+ ```bash
34
+ git clone https://github.com/YichengYang-Ethan/oracle3-prediction-market-agent.git
35
+ cd oracle3-prediction-market-agent
36
+ python -m venv .venv
37
+ .venv/bin/python -m pip install -e .
38
+ ```
39
+
40
+ Connect it to Claude Code from this directory:
41
+
42
+ ```bash
43
+ claude mcp add oracle3 -- "$PWD/.venv/bin/oracle3-mcp"
44
+ ```
45
+
46
+ For other MCP clients, configure the absolute path to `.venv/bin/oracle3-mcp` as the command with an empty argument list. On Windows, use `.venv\Scripts\python.exe` and `.venv\Scripts\oracle3-mcp.exe`.
47
+
48
+ [Client configuration and first tool call](docs/agent-quickstart.md) · [Published-package installation](docs/mcp.md)
49
+
50
+ ### Give your agent a first task
51
+
52
+ > Find Kalshi and Polymarket contracts about the next Fed rate decision. Compare their outcome definitions, resolution rules, and order-book quotes. Summarize the markets with their IDs, prices, and the assumptions needed to compare them.
53
+
54
+ For a calculation that works offline after installation:
55
+
56
+ > Use Oracle3 to check an implication: A implies B. A has a YES bid of $0.60 and B has a YES ask of $0.55. Use the default Kalshi taker fee schedule and 100 contracts per leg. Show the basket, gross edge, fees, and net edge.
57
+
58
+ The synthetic example returns **$5.00 gross edge − $3.4125 fees = $1.5875 calculated net edge**, conditional on the supplied implication and quotes. [See exact inputs and output](docs/agent-quickstart.md#first-call-a-deterministic-fee-check).
59
+
60
+ ## What agents can do
61
+
62
+ | Task | Tools | Result |
63
+ |---|---|---|
64
+ | Discover markets | `search_markets`, `get_market` | Contracts, metadata, and available resolution rules |
65
+ | Inspect market conditions | `get_quote`, `get_orderbook` | Prices, fee information, and displayed depth |
66
+ | Analyze related contracts | `check_constraint`, `check_constraint_live` | Baskets and net edge under a stated relationship |
67
+ | Calculate fees and model values | `trading_fee`, `fair_value` | Fee estimates and parameterized model outputs |
68
+ | Get a calibrated probability | `model_probability` | A machine-learning probability next to the market price, with the model's out-of-sample scores ([how it was built and tested](docs/ml.md)) |
69
+ | Try a paper entry | `paper_order`, `paper_portfolio` | Simulated fills and holdings in a local ledger |
70
+
71
+ Relationship checks cover **implication, exclusivity, complement, same event, and event sum**. They expose assumptions with their results, giving agents and researchers a common calculation layer.
72
+
73
+ [All 14 MCP tools](docs/mcp.md) · [Workflow examples](docs/agent-quickstart.md)
74
+
75
+ ## Reusable agent Skills
76
+
77
+ The repository includes six workflows that help agents move from individual tool calls to complete tasks:
78
+
79
+ | Skill | Use it to |
80
+ |---|---|
81
+ | [Data discovery](skills/pm-data-discovery/SKILL.md) | Find markets and organize research inputs |
82
+ | [Constraint arbitrage](skills/pm-constraint-arbitrage/SKILL.md) | Examine related contracts and calculate fee-aware baskets |
83
+ | [Quant strategy authoring](skills/pm-quant-strategy-authoring/SKILL.md) | Develop strategies with Oracle3's Python interfaces |
84
+ | [Agent strategy authoring](skills/pm-agent-strategy-authoring/SKILL.md) | Build agent-driven decision workflows |
85
+ | [Paper operations](skills/pm-paper-trade-ops/SKILL.md) | Run and inspect simulated trading sessions |
86
+ | [Live operations](skills/pm-live-trade-ops/SKILL.md) | Configure and operate the separate live engine |
87
+
88
+ Claude Code project copies are included in [`.claude/skills/`](.claude/skills/). Open the checkout as your project, or use your client's supported Skill installation mechanism. [Skill setup](docs/agent-quickstart.md#agent-skills).
89
+
90
+ **For AI agents:** start with [`llms.txt`](llms.txt) for task routing, the [MCP reference](docs/mcp.md) for tool schemas, and [`AGENTS.md`](AGENTS.md) for contributing code.
91
+
92
+ ## Build with Python and the CLI
93
+
94
+ Use the same project for research scripts, agent strategies, and engine operations:
95
+
96
+ ```bash
97
+ .venv/bin/oracle3 market search --exchange kalshi --query "fed" --json
98
+ .venv/bin/oracle3 market search --exchange polymarket --query "fed decision" --json
99
+ ```
100
+
101
+ | Component | Build with it |
102
+ |---|---|
103
+ | [MCP server](oracle3/mcp_server/) | Structured market access and local paper operations for agents |
104
+ | [Relations and fees](oracle3/arbitrage.py) | Shared calculations for related-contract strategies |
105
+ | [Strategies](oracle3/strategy/) | Logical-relation, statistical, and model-driven approaches |
106
+ | [Trading engine](oracle3/trader/) | Paper/live adapters for Kalshi, Polymarket, and Solana via DFlow |
107
+ | [Pricing](oracle3/pricing/) | Wang-transform models and estimators for research |
108
+ | [oracle3-extras](https://github.com/YichengYang-Ethan/oracle3-extras) | Optional venue, data-provider, and wallet integrations |
109
+
110
+ [CLI guide](docs/CLI_MONITORING.md) · [Integration guide](docs/extras.md) · [Execution reference](docs/runtime-integrity.md)
111
+
112
+ ## Built for experimentation
113
+
114
+ Oracle3 combines a concrete decision environment with structured tools, observable state, and a software validation harness. This supports work on agent interfaces, workflow guidance, and reproducible evaluation.
115
+
116
+ [CI](https://github.com/YichengYang-Ethan/oracle3-prediction-market-agent/actions/workflows/pytest.yml) runs automated tests and checks the built package through real MCP sessions on SDK 1.x and 2.x. The [harness documentation](docs/agent-harness.md) explains the reproducible checks. Model-level agent evaluation is a next research direction.
117
+
118
+ [Project overview and Yicheng Yang's contributions](docs/research-review.md) · [Fee-frontier study](docs/research/fee-frontier.md) · [Companion pricing research](https://github.com/YichengYang-Ethan/prediction-market-pricing)
119
+
120
+ ## Contribute
121
+
122
+ Help build better agent workflows, labeled evaluation tasks, strategy examples, and client integrations. New venue, data-provider, and wallet integrations start in [oracle3-extras](https://github.com/YichengYang-Ethan/oracle3-extras).
123
+
124
+ [Contributing guide](.github/CONTRIBUTING.md) · [Open problems](https://github.com/YichengYang-Ethan/oracle3-prediction-market-agent/issues?q=is%3Aissue+label%3Aopen-problem) · [Discussions](https://github.com/YichengYang-Ethan/oracle3-prediction-market-agent/discussions)
125
+
126
+ ## Origin and attribution
127
+
128
+ Oracle3 began as `ulab-uiuc/oracle3`, developed by Yicheng Yang and Haofei Yu at U Lab (University of Illinois Urbana-Champaign). It also bundles the lab's [Coinjure](https://github.com/ulab-uiuc/coinjure) package. Yicheng Yang continues to develop and maintain the extensions in this repository. [Read the project story and contributions](docs/research-review.md).
129
+
130
+ We acknowledge the foundational work of the Coinjure team at the University of Illinois Urbana-Champaign—Haofei Yu, Yicheng Yang, Yuxiang Liu, and Prof. Jiaxuan You—on which Oracle3 builds.
131
+
132
+ For software citation, use [CITATION.cff](CITATION.cff) and [Zenodo](https://doi.org/10.5281/zenodo.20062548). For the pricing model, see the [working paper](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6468338).
133
+
134
+ ## License
135
+
136
+ Apache 2.0; see [LICENSE](LICENSE). Original U Lab and Coinjure portions retain their MIT license in [NOTICE](NOTICE).
137
+
138
+ *This software is for research and education. Trading involves financial risk.*
@@ -1,3 +1,3 @@
1
1
  """oracle3 package."""
2
2
 
3
- __version__ = '1.2.2'
3
+ __version__ = '1.3.0'