#Investing
5 posts tagged Investing. All posts
AI Investing Research Systems: ai-berkshire and the Agents Built on BuffettHow ai-berkshire turns Claude Code into a four-analyst value investing team, how it compares with TradingAgents, and what research says about LLM stock picking.
Computing CAGR, volatility, Sharpe ratio and max drawdown in PythonCompute CAGR, annualised volatility, the Sharpe ratio and maximum drawdown from daily prices with pandas, and avoid the annualisation and return-type mistakes.
Pulling company fundamentals from the SEC's XBRL company facts APIFetch revenue and net income for US-listed companies from data.sec.gov: CIK lookup, companyfacts and companyconcept, us-gaap tags, and deduplicating 10-K facts.
A portfolio rebalancing calculator in PythonWrite a rebalancing calculator in plain Python: target weights, drift, rebalance bands, putting new cash to work before selling, and rounding to whole shares.
Backtesting a moving-average crossover in pandas without look-ahead biasA vectorised pandas backtest of a 50/200-day crossover: signals on the close, trades on the next bar, transaction costs, and why one price series proves nothing.
© 2026 David Li · Home · Blog · RSS ·Classic site · Built with Astro, Starlight and three.js · Logos:Font Awesome Free (CC BY 4.0)