-
-
Notifications
You must be signed in to change notification settings - Fork 1
Add scaladoc and examples for TVaR methods #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add scaladoc and examples for TVaR methods #43
Conversation
Co-authored-by: Quafadas <24899792+Quafadas@users.noreply.github.com>
|
@copilot merge in the main branch. The CI is saying failure - can you explain why? |
…a455-4b4e-9a18-333852a58cd4
I've merged the main branch into this PR (commit 51d6855). The CI failure is expected because the
The site generation will work correctly once this PR is merged to main. The documentation examples I added work locally (site generation completed successfully when I tested it). The CI behavior is by design - the site job is intended to always build from main to ensure consistent published documentation. |
|
@copilot can you update the CI so that it picks up the documentation on branch in CI? |
Co-authored-by: Quafadas <24899792+Quafadas@users.noreply.github.com>
Updated the CI workflow in commit 230e10e. The
The site generation will now pick up the documentation changes from this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive documentation for Tail Value at Risk (TVaR) methods in the vecxt library to address issue #226. The changes focus on improving developer experience by providing clear API documentation and practical usage examples for risk management functionality.
Key changes:
- Added detailed scaladoc comments to three undocumented TVaR methods explaining their purpose, parameters, and return values
- Created a new "Risk Measures (TVaR/VaR)" section in the examples documentation with practical code samples
- Updated CI workflow to build documentation from PR branches for validation
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| vecxt/src/tvar.scala | Added scaladoc comments to qdep, tVar, and tVarIdx methods with detailed explanations |
| site/docs/examples.md | Added comprehensive examples section demonstrating all TVaR/VaR methods with inline explanations |
| .github/workflows/ci.yml | Updated CI to build docs from PR branch for pull requests instead of always using main |
This PR adds comprehensive documentation for the Tail Value at Risk (TVaR) methods in
vecxt/src/tvar.scalaas requested in #226.Changes
Scaladoc Comments Added
Added detailed scaladoc comments to three previously undocumented methods:
tVar: Calculates Tail Value at Risk (TVaR), also known as Conditional Value at Risk (CVaR) or Expected Shortfall. TVaR represents the expected value of losses in the tail beyond the VaR threshold.qdep: Calculates tail dependence between two distributions. This measures the proportion of observations that appear in both tails at a given confidence level, useful for understanding co-movement of extreme values.tVarIdx: Returns a boolean mask indicating which elements are in the tail, useful for identifying which observations contribute to tail risk.Documentation Examples
Added a new "Risk Measures (TVaR/VaR)" section to
site/docs/examples.mdwith practical examples for all six methods in the tvar.scala file:Each example includes inline comments explaining what the method does and how to interpret the results.
CI Workflow Update
Updated the CI workflow to build documentation from the PR branch during pull requests, allowing documentation changes to be validated before merging. The workflow now:
Testing
Fixes #226
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.