원클릭으로
officeqa-compute
Python one-liner recipes for common Treasury Bulletin calculations — stdev, regression, pct change, CAGR, etc.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Python one-liner recipes for common Treasury Bulletin calculations — stdev, regression, pct change, CAGR, etc.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Review board — verify the analyst's answer before final submission
Python computation formulas for Treasury data analysis. Use for percent change, CAGR, stdev, kurtosis, VaR, regression, Theil index, and other statistical calculations.
CPI-U annual averages (1929-2024) for inflation adjustment. Use when question mentions inflation, CPI, constant dollars, or real dollars.
How to read Treasury Bulletin data files in /app/resources/. Use when exploring resources or when JSON parsing fails.
U.S. fiscal year boundaries and calendar year conversions. Use when question mentions fiscal year, FY, or when you need to determine which months belong to a fiscal year.
How to accurately extract values from Treasury Bulletin tables. Use when reading tables with many columns, similar row labels, or when you need to verify you have the right cell.
| name | officeqa-compute |
| description | Python one-liner recipes for common Treasury Bulletin calculations — stdev, regression, pct change, CAGR, etc. |
All recipes use python3 -c with extracted values. Replace [...] with your actual numbers.
Sum monthly values: extract 12 months → python3 -c "print(sum([v1,...,v12]))"
Pct change: extract old, new → python3 -c "print((NEW-OLD)/OLD*100)"
Stdev (sample): extract N values → python3 -c "import statistics; print(statistics.stdev([...]))"
Stdev (population): → statistics.pstdev([...])
Geometric mean: N positive values → statistics.geometric_mean([...])
Regression: paired (x,y) → r=statistics.linear_regression(xs,ys); print(r.slope,r.intercept)
Correlation: → statistics.correlation(xs,ys)
Theil index: N values → import math; v=[...]; m=sum(v)/len(v); print(sum((x/m)*math.log(x/m) for x in v)/len(v))
Z-score: series + target → print((TARGET-statistics.mean(v))/statistics.stdev(v))
Expected shortfall 95%: → v=sorted([...]); c=max(1,int(len(v)*0.05)); print(sum(v[:c])/c)
CAGR: start,end,years → print(((END/START)**(1/YEARS)-1)*100)
Compounded growth: → import math; print(math.log(END/START)/YEARS)
python3 -c "
x=YOUR_RAW_VALUE; n=DECIMAL_PLACES
print(f'raw={x}')
print(f'rounded={round(x,n)}')
print(f'truncated={int(x*10**n)/10**n}')
"
If rounded and truncated differ, prefer truncated — Treasury legacy systems use fixed-point truncation.