financial-calculator by aaaaqwq/agi-super-skills
npx skills add https://github.com/aaaaqwq/agi-super-skills --skill financial-calculator全面的财务计算功能,包括未来价值、现值、折扣/加价定价、复利以及比较表格。
# 未来价值
python3 scripts/calculate.py fv 10000 0.05 10 12
# PV=$10,000, 利率=5%, 年数=10, 按月复利
# 现值
python3 scripts/calculate.py pv 20000 0.05 10 12
# FV=$20,000, 利率=5%, 年数=10, 按月复利
# 折扣
python3 scripts/calculate.py discount 100 20
# 价格=$100, 折扣=20%
# 加价
python3 scripts/calculate.py markup 100 30
# 成本=$100, 加价=30%
# 未来价值表
python3 scripts/calculate.py fv_table 10000 0.03 0.05 0.07 --periods 1 5 10 20
# 本金=$10,000, 利率=3%,5%,7%, 期限=1,5,10,20 年
# 折扣表
python3 scripts/calculate.py discount_table 100 10 15 20 25 30
# 价格=$100, 折扣=10%,15%,20%,25%,30%
启动交互式计算器:
./scripts/launch_ui.sh [port]
# 默认端口: 5050
# 打开地址: http://localhost:5050
# 如需会自动创建 venv 并安装 Flask
或手动启动:
cd skills/financial-calculator
python3 -m venv venv # 仅首次运行
venv/bin/pip install flask # 仅首次运行
venv/bin/python scripts/web_ui.py [port]
功能特性:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
计算投资在复利情况下的未来价值。
使用场景:
输入项:
计算未来金额的当前价值 (折现价值)。
使用场景:
输入项:
计算应用百分比折扣后的最终价格。
使用场景:
输入项:
输出项:
根据成本和加价百分比计算销售价格。
使用场景:
输入项:
输出项:
提供复利计算的详细分解。
使用场景:
输出项:
生成跨多个利率和时间期限的比较表格。
使用场景:
特性:
比较同一价格的多个折扣百分比。
使用场景:
特性:
需要 Python 3.7+ 和 Flask:
pip install flask
或使用 venv:
python3 -m venv venv
source venv/bin/activate
pip install flask
导入计算模块:
from calculate import (
future_value,
present_value,
discount_amount,
markup_price,
compound_interest,
generate_fv_table,
generate_discount_table
)
# 计算 FV
fv = future_value(
present_value=10000,
rate=0.05, # 5% 以小数表示
periods=10,
compound_frequency=12 # 按月
)
# 生成表格
table = generate_fv_table(
principal=10000,
rates=[0.03, 0.05, 0.07], # 以小数表示
periods=[1, 5, 10, 20]
)
查看 references/formulas.md 以获取所有计算的详细数学公式、示例和使用场景。
利率格式:
复利频率:
表格生成: 进行有意义比较的最佳实践:
性能:
每周安装量
1
仓库
GitHub 星标数
11
首次出现
1 天前
安全审计
安装于
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
Comprehensive financial calculations including future value, present value, discount/markup pricing, compound interest, and comparative tables.
# Future Value
python3 scripts/calculate.py fv 10000 0.05 10 12
# PV=$10,000, Rate=5%, Years=10, Monthly compounding
# Present Value
python3 scripts/calculate.py pv 20000 0.05 10 12
# FV=$20,000, Rate=5%, Years=10, Monthly compounding
# Discount
python3 scripts/calculate.py discount 100 20
# Price=$100, Discount=20%
# Markup
python3 scripts/calculate.py markup 100 30
# Cost=$100, Markup=30%
# Future Value Table
python3 scripts/calculate.py fv_table 10000 0.03 0.05 0.07 --periods 1 5 10 20
# Principal=$10,000, Rates=3%,5%,7%, Periods=1,5,10,20 years
# Discount Table
python3 scripts/calculate.py discount_table 100 10 15 20 25 30
# Price=$100, Discounts=10%,15%,20%,25%,30%
Launch the interactive calculator:
./scripts/launch_ui.sh [port]
# Default port: 5050
# Opens at: http://localhost:5050
# Auto-creates venv and installs Flask if needed
Or manually:
cd skills/financial-calculator
python3 -m venv venv # First time only
venv/bin/pip install flask # First time only
venv/bin/python scripts/web_ui.py [port]
Features:
Calculate what an investment will be worth in the future with compound interest.
Use cases:
Inputs:
Calculate the current value of a future amount (discounted value).
Use cases:
Inputs:
Calculate final price after applying percentage discount.
Use cases:
Inputs:
Outputs:
Calculate selling price from cost and markup percentage.
Use cases:
Inputs:
Outputs:
Detailed breakdown of compound interest calculations.
Use cases:
Outputs:
Generate comparison table across multiple rates and time periods.
Use cases:
Features:
Compare multiple discount percentages for the same price.
Use cases:
Features:
Requires Python 3.7+ and Flask:
pip install flask
Or with venv:
python3 -m venv venv
source venv/bin/activate
pip install flask
Import the calculation module:
from calculate import (
future_value,
present_value,
discount_amount,
markup_price,
compound_interest,
generate_fv_table,
generate_discount_table
)
# Calculate FV
fv = future_value(
present_value=10000,
rate=0.05, # 5% as decimal
periods=10,
compound_frequency=12 # Monthly
)
# Generate table
table = generate_fv_table(
principal=10000,
rates=[0.03, 0.05, 0.07], # As decimals
periods=[1, 5, 10, 20]
)
See references/formulas.md for detailed mathematical formulas, examples, and use cases for all calculations.
Rate Format:
Compounding Frequencies:
Table Generation: Best practices for meaningful comparisons:
Performance:
Weekly Installs
1
Repository
GitHub Stars
11
First Seen
1 day ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
LarkSuite Whiteboard CLI 工具:自动化生成专业图表与画板,支持DSL和Mermaid
19,800 周安装