Skip to content

Conversation

@AlstonLi007
Copy link
Owner

Summary

  • move all Chinese-language articles into a single Chinese_Content.md file for centralized reference
  • add a financial_programs package with option pricing, portfolio analytics, and fixed income utilities

Testing

  • python -m compileall financial_programs

https://chatgpt.com/codex/tasks/task_e_68e7bc9c13e48321ab862b5097863187

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +94 to +98
for period in range(1, periods + 1):
cash_flow = coupon if period < periods else coupon + face_value
pv = cash_flow / denom ** period
total += period * (period + 1) * pv
return total / (price * denom * denom)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Adjust convexity for coupon frequency

convexity() accumulates period-based weights but returns total / (price * denom * denom) without dividing by frequency**2. Macaulay convexity in years requires scaling by because t counts coupon periods, so when frequency ≠ 1 (e.g., semiannual bonds with frequency=2) this function overstates convexity by frequency²—about 4× too high in that case—leading to materially incorrect interest-rate sensitivity estimates.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants