Repository navigation
docs(reference): bring the API examples in line with the current code - #78
Merged
Merged
Conversation
The reference was moved out of the README unchanged and had drifted: CostModel fields (f64 bps, min_commission), Shares in Position fills, the backtest_weights signature (CostModel, FillPolicy, BarPrices), equity_curve length (initial equity plus one per period), the Broker trait (open_orders, client_order_id, quote timestamp), the stop event variants, UTF-8 symbol limit, metrics fields, risk status strings, rebalancer and lob CLI commands, and Python stop and broker options. Every changed Rust example was compiled and run in a scratch crate; the old snippets fail to compile. Co-authored-by: Ricardo Frantz <4220623+ricardofrantz@users.noreply.github.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 21 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
All reported issues were addressed across 1 file
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Co-authored-by: Ricardo Frantz <4220623+ricardofrantz@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #76, which moved the developer reference to
docs/reference.mdunchanged. The review there flagged stale examples; this fixes those and about fifteen more found by checking every example against the source:CostModel: bps fields aref64,min_trade_feeismin_commission.Position::apply_filltakesShares.backtest_weights(Rust and Python) takesCostModel,FillPolicyandBarPrices;equity_curveholds the initial equity plus one entry per period; result fields listed in full.Brokertrait:open_orders,BrokerOrder.client_order_id,Quote.timestamp.SubmitStop*variants. Symbol limit: 8 UTF-8 bytes.compute_metricsreturnsOption<Metrics>; risk statuses arePASS|WARN|FAIL; rebalancer andlobCLI commands completed; Python stop and broker options documented.Check: every changed Rust example compiles and runs (with asserts) in a scratch crate depending on the workspace by path; the old snippets fail to compile. Python examples checked against the PyO3 source and run against a local build.