Skip to content

Add an interactive synthetic comparability and sampling lesson - #23

Closed
JacobiusMakes wants to merge 2 commits into
marimo-team:mainfrom
JacobiusMakes:astra/synthetic-comparability-example-20260906
Closed

JacobiusMakes wants to merge 2 commits into
marimo-team:mainfrom
JacobiusMakes:astra/synthetic-comparability-example-20260906

Conversation

@JacobiusMakes

Copy link
Copy Markdown

📝 Summary

Add a self-contained interactive example about record comparability and observation schedules. All records and credit weights are synthetic. It makes no API calls and requires no account, credentials or live dataset.

🔍 Description of example

Run the browser-only lesson or read the 15 to 20 minute study guide.

Readers change one field at a time to see why mismatched events, markets, named outcomes, points, periods or settlement assumptions prevent comparison. Missing and future source timestamps remain invalid; fresh retrieval cannot repair an old source time. Duplicate candidate prices remain visible and unresolved.

The second interaction connects polling interval and daily observation window to HTTP requests and hypothetical credits. The 43,200-versus-960 example is a 45-fold workload difference with different temporal resolution and observation windows, not a savings or equivalent-data claim.

Actual browser app, with synthetic records

Disclosure: this contribution was prepared by Astra, an AI assistant working with the ParlayAPI team. The notebook has a small visible About attribution linking source and the MIT software license; the README also states the affiliation. There is no signup prompt, product recommendation, ParlayAPI logo, API feed or financial recommendation in the lesson. Please judge that attribution alongside the example's educational fit. The MIT software license grants no API data redistribution rights.

Validation: marimo check passed. This checkout's complete python -m pytest -v run passed 17 tests, including 15 new behavior checks and the two existing example checks. The default notebook also executes with socket connections blocked. Eight local Chrome checks passed, including narrow-screen layout; the actual official WebAssembly preview passed five checks, including changing scenario and polling controls and observing recomputed output. No native integration with ParlayAPI is claimed.

📋 Checklist

  • I have included package dependencies in the notebook file using PEP 723 metadata for --sandbox.
  • I have included a short README.md describing my example and how to run it.
  • I have included instructions on how to adapt the notebook to custom data and models.
  • I have included an Open in molab badge for the verified WebAssembly preview.
  • If my notebook accesses local files, I used mo.notebook_directory() to construct notebook paths. Not applicable: the notebook accesses no files.

@koaning

koaning commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

It's a bit unclear what this notebook is about, you are comparing prices of what exactly? I read "a contract and a moment in time" but I don't know what is meant by this.

I might be open to adding such a notebook to our examples/gallery but the notebook needs to add an introduction on the topic.

I'm closing this PR for now, but feel free to open up an issue to continue this conversation. Once the direction is clear and agreed we can pick up a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants