Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
This Python package implements fundamental methods for modeling life contingent risks, and closely follows the coverage of traditional topics in actuarial exams and standard texts such as the "Fundamentals of Actuarial Math - Long-term" exam syllabus by the Society of Actuaries, and "Actuarial Mathematics for Life Contingent Risks" by Dickson, Hardy and Waters.
The package comprises three sets of classes, which:
Implement general actuarial methods
Basic interest theory and probability laws
Survival functions, expected future lifetimes and fractional ages
Insurance, annuity, premiums, policy values, and reserves calculations
Adjust results for
Extra mortality risks
1/mthly payment frequency using UDD or Woolhouse approaches
Specify and load a particular form of assumptions
Recursion inputs
Life table, select life table, or standard ultimate life table
Mortality laws, such as constant force of maturity, beta and uniform distributions, or Makeham's and Gompertz's laws
pip install actuarialmath
numpy
, scipy
, matplotlib
and pandas
.Start Python (version >= 3.10) or Jupyter-notebook
Select a suitable subclass to initialize with your actuarial assumptions, such as MortalityLaws
(or a special law like ConstantForce
), LifeTable
, SULT
, SelectLife
or Recursion
.
Call appropriate methods to compute intermediate or final results, or to solve
parameter values implicitly.
Adjust the answers with ExtraRisk
or Mthly
(or its UDD
or Woolhouse
) classes.
::
from actuarialmath import Recursion, Woolhouse
life = Recursion().set_interest(i=0.04)
.set_A(0.188, x=35)
.set_A(0.498, x=65)
.set_p(0.883, x=35, t=30)
mthly = Woolhouse(m=2, life=life, three_term=False)
print(1000 * mthly.temporary_annuity(35, t=30)) # solution = 17376.7
::
from actuarialmath import SULT, Contract life = SULT()
S = life.FPT_policy_value(35, t=1, b=1000) # is always 0 in year 1!
contract = Contract(benefit=1000, initial_premium=.3, initial_policy=300, renewal_premium=.04, renewal_policy=30)
G = life.gross_premium(A=life.whole_life_insurance(35), **contract.premium_terms)
R = life.gross_policy_value(35, t=1, contract=contract.set_contract(premium=G)) print(R-S) # solution = -277.19
Jupyter notebook <https://terence-lim.github.io/notes/faml.ipynb>
_ or run in Colab <https://colab.research.google.com/github/terence-lim/terence-lim.github.io/blob/master/notes/faml.ipynb>
_, to solve all sample SOA FAM-L exam questions
User Guide <https://actuarialmath-guide.readthedocs.io/en/latest/>
, or download pdf <https://terence-lim.github.io/notes/actuarialmath-guide.pdf>
API reference <https://actuarialmath.readthedocs.io/en/latest/>
_
Github repo <https://github.com/terence-lim/actuarialmath.git>
_ and issues <https://github.com/terence-lim/actuarialmath/issues>
_
FAQs
A package for solving actuarial math and life contingent risks
We found that actuarialmath demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.