top of page

Ideas for future

Dynamic Programming for Optimal Stock Trading: Comparing Hindsight-Based Optimization with Real-Time Predictive Models

The "Best Time to Buy and Sell Stock" problem is a staple of LeetCode and coding interviews. Its classic dynamic programming solution finds the perfect trades, but only because it already knows every future price. Real traders never have that advantage. This post compares the perfect-hindsight solution with a realistic machine learning model, and introduces a simple way to measure the difference between them: the regret gap. Quick Summary Dynamic programming (DP) finds the ma

What factors affect the CPI value for food?

The increase in the price of food, which is known as inflation, has been a constant issue. With it affecting the spending patterns and disposable income of consumers along with influencing economic policy. Especially due to the price of food being more sensitive to supply shocks due to inelastic demand and a longer period to produce it. This report will use the monthly change in the consumer price index for the fiscal years 2019 to 2024 to look for differences in the rate of

bottom of page