Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ jobs:
# A workbook following 20,000 prices one at a time, checked against
# LibreOffice for the first 300 and a second graph at the end.
- run: cargo run --locked --release -p watershed-xlsx --example live -- 20000
# A pension statement's workbook for 20,000 members, checked against
# LibreOffice for 300, and each answer it seeks checked to be the least.
- run: cargo run --locked --release -p watershed-gpu --example illustrations -- 20000

web:
name: Web demo (WebAssembly)
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ with its checks and timings.
of its inputs comes with it, for a few times the cost of the answer. A
rating workbook gives every quote it can, 16 million of them, in half a
minute. A risk desk's workbook follows a price feed at 68,000 prices a
second, working out only what each price reaches.
second, working out only what each price reaches. A pension statement's
workbook is run for 300,000 members, and then tried again and again to
find what each member who is short would have to pay in.
- **Live tables in the browser.** A grid whose cells, columns and totals are
formulas, updated as edits arrive, as a TypeScript package with components
for [Solid](packages/grid-solid) and [React](packages/grid-react). The
Expand Down
8 changes: 8 additions & 0 deletions crates/watershed-gpu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Where a time is scaled up from a smaller run, it says so.
| `audit` | The same workbook tried at 200,000 points spread over its inputs' ranges and at every corner of them, each input then moved through its range from 300 starting points, and a later version of the workbook run for the same points | its own findings when run on its own: the two cells changed, and which loans the slip in one of them reaches | not run | 17 s for all of it, on the same 4 cores | |
| `sensitivities` | The same workbook's provision with its derivative by 689 inputs (17 of the bank's choices and every quarter of three paths of the economy), for 50,000 mortgages | nudging each input up and down for the workbook's own loan: all 689 agree, the furthest by 4×10⁻⁹ | not run | 7.6 s, against 1.4 s for the provision alone, on the same 4 cores | nudging each for the book, 1,378 runs of it: 32 minutes (scaled) |
| `quotes` | A car insurance rating workbook, priced for every customer it can quote: 16 million combinations of age, area, vehicle group, years without a claim, mileage, excess and cover. Then again with next quarter's rates | LibreOffice recalculating the workbook for each of 300 customers: every answer the same to the penny; 2,000 quotes against the graph | not run | 31 s, on 4 cores of a different machine (a cloud VM) | LibreOffice, a quote at a time, at the 9.73 ms it took on that machine: 43 hours (scaled). A quote looked up in the finished table: 54 ns |
| `illustrations` | A workbook that works out one member's pension statement (1,168 formulas: the pot year by year to retirement at three rates of growth), for a scheme of 300,000 members. Then, for each of the 180,801 who are short, the least they could pay in that would put them on track | LibreOffice recalculating the workbook for each of 300 members: every answer agrees; 2,000 members against the graph, bit for bit | not run | 2.1 s for the statements and 6.1 s for 844,377 tries of the workbook, on 4 cores of a different machine (a cloud VM) | LibreOffice, a member at a time, at the 15.6 ms it took on that machine: 78 minutes for the statements alone (scaled) |
| `dosing` | An antibiotic's dosing protocol tried on 5 million made-up patients, each followed for 72 hours | SciPy's LSODA solver, 300 patients: 1.7×10⁻¹⁰ | 60 ms a protocol, 51 protocols in 3.0 s | 1.8 s a protocol | the graph: 70 s (scaled) |
| `monte_carlo` | 200,000 positions on 500 shares, 100,000 futures | the graph, bit for bit | 1.6 s | about 29 s (scaled) | the graph: about 25 minutes (scaled) |
| `tax_benefit` | A country's tax and benefit rules over 10 million households | the graph, bit for bit | 0.7 s | 0.5 s | the graph: 28 s (scaled) |
Expand Down Expand Up @@ -446,6 +447,12 @@ What is taken from somewhere, and what is made up.
`examples/shared/rating.py` and worked out by LibreOffice, which the same
script then drives through 300 customers for the reference. Every rate
in it is made up, as are next quarter's.
- **`illustrations`.** The workbook, `examples/shared/illustration.xlsx`, is
written by `examples/shared/illustration.py` and worked out by
LibreOffice, which the same script then drives through 300 members for
the reference. The members, the rates of growth, the income a pot buys
and the income to aim for are all made up, so the share of members on
track says nothing about any real scheme.
- **`backtest`, `experts`.** Daily prices from 2010 to 2025 for shares with
a price throughout, from the FINSABER data set on Hugging Face
(`finsaber-team/FINSABER-V2-Data`), which does not say where its prices
Expand Down Expand Up @@ -476,6 +483,7 @@ cargo run --release --features cuda --example credit_loss
cargo run --release --features cuda --example audit
cargo run --release --features cuda --example sensitivities
cargo run --release --features cuda --example quotes
cargo run --release --features cuda --example illustrations
```

Without `--features cuda` each runs on the CPU, with fewer scenarios unless
Expand Down
Loading
Loading