Skip to main content

Posts

Showing posts with the label moedeling

Understand Yahoo Finance Historical Data

I frequently visit Yahoo Finance website. The reason is that it provides almot complete historical stock data for which I use to build financial models. In order to use the right data, I need to kwno the "Close price adjusted for splits" and "Adjusted close price adjusted for splits and dividend and/or capital gain distributions" that Yahoo Finance presents. Close price adjusted for splits

Does Rebalance Improve Investment Portfolio Performance?

Portfolio rebalance almost always produces better Sharpe ratio than those who don't. Simulator This simulates the investment restuts of a SPY/Cash portfolio rebalanced with different thresholds. The portfolio starts with $1,000 and SPY initial price is $400.Adjust the cash return to represent short-term bond yield. Cash Ratio: % SPY Ratio: % Mean Monthly Return: % Monthly Return Standard Deviation: % Cash Mean Monthly Return: % Investment Duration: year(s). Choose Rebalance Frequency: Monthly Quarterly Semi-annually Annually Rebalance Threshold: %. Simulte Results Comparison Total Returns No-rebalanced: 0 % ALL Stock Portfolio: 0 % Rebalanced By Period: 0 % Rebalanced By Threshold: 0 % Mean Monthly Return No-rebalanced: 0 % ALL Stock Portfolio: 0 % Rebalanced By Period: 0 % Rebalanced By Threshold: 0 % Monthly Return Standard Deviation No-rebalanced: 0 % ALL Stock Po...

Do Threshhold Levels Affect Performance of Portfolio Based On Threshhold Rebalanced Strategy?

I define threshold rebalancing as this: when the market tracking index fund's value is different than the target and the diference is bigger than the threshhold, I rebalance the portfolio. If the stock position has more value, I sell stock and buy otherwise in order to achieve the target allocation ratio. This means the lower the threshhold or the more the stock price flucturates, the more frequent we rebalacnce our portfolio, Simulator This simulates the investment restuts of a SPY/Cash portfolio rebalanced with different thresholds. The portfolio starts with $1,000 and SPY initial price is $400.Adjust the cash return to represent short-term bond yield. Cash Ratio: % SPY Ratio: % Mean Monthly Return: % Monthly Return Standard Deviation: % Cash Mean Monthly Return: % Investment Duration: year(s). Threshold 1: %. Threshold 2: %. Threshold 3: %. Threshold 4: %. Simulte Results Comparison Total Returns No-rebalanced: 0 % Rebalanced Monthly: 0...

The More Often We Rebalance Investment Portfolio the Better?

No, the frequsncy of rebalancing has no significant effects on the investment results with a sefined cash and stock ratio. Cash here is a proxy for short-term bond yields with no fluctuation return rates. Furthermore, investment portfolios rebalanced periodically does not have better Sharpe ratios than the non-rebalanced one. Simulator This simulates the investment restuts of a SPY/Cash portfolio rebalanced with a defined cash ratio monthly, quarterly, semi-annually and annually. The portfolio starts with $1,000 and SPY initial price is $400.Adjust the cash return to represent short-term bond yield. Cash Ratio: % SPY Ratio: % Mean Monthly Return: % Monthly Return Standard Deviation: % Cash Mean Monthly Return: % Investment Duration: year(s). Simulte Results Comparison Total Returns No-rebalanced: 0 % Rebalanced Monthly: 0 % Rebalanced Quarterly: 0 % Rebalanced Semi-annually: 0 % Rebalanced Annually: 0 % Mean Monthly Return ...

How Sharpe Ratio Affects Retirement Funds

I made a simulator to help us visualize how  investment portfolio values change based on different Sharpe Ratio in this blog post.  Now, I want to if how much the Sharpe ratio can affect our retirement portfolio from which we withdraw. What about retire with just government bonds? Suppose I hold 30 year US Treasury Bonds with a yield of 4%. The face value of the bonds is $1,000,000, I can receive $1,000,000 X 4% = $40,000 every year to cover my daily expenses for 30 years without any risk. This retirement portfolio has no value flucturation and I will not worry about any stock market turmol.  Usually, bonds have just enough returns to cover inflation, so all-bond portfolio may not be the bset for retirement. How about with a balanced portfolio? With a balanced portfolio, the return should be better than a 100% bond one. But a portfolio mixed with stocks may flucturate in price, which may cause problems if the flucturation is too big...

Simulator for Comparison Withdrawing Between a SPY/Cash Portfolio And An ALL SPY One With Hypothetical Return Data

I have researched on whether we would be broke, retiring right before the 2000 and 2008 financial crises if we withdraw 4% every  year from a all IVV portfolio, the answer is that we would not. We would actually be richer after some years. Details are in this article . I also made a simulator for withdrawing 4% annually from a pure SPY portfolio, you can play with it. The simulator is here . Now, I want to find out whether a cash-SPY portfolio is better than a full SPY portfolio. Why cash? I use cash for asset allocation because cash return standard deviation is 0. meaning there do no risk. Cash has no return correction with stock. Stock price fluctuation dose not affect cash return. Therefore, cash is a good proxy for short term bond in this scenario. simulator SPY daily return mean and standard deviaion is derived from all daily closing prices from 1993/1/29 to 2022/2/5. The annual return mean is daily mean return times 252, while its sta...

Evaluate Mean and Standard Deviation for Asseet Allocation of SPY and Cash

Assume cash has a mean return of 0, return standard deviation of 0 and has no corration with SPY, in theroy, with x percent of cash ans 1-x percent of y, the portfolio mean return is (1-x) times SPY mean return and standard devation of (1-x) times SPY standard deviation. Mathematical proof is in this blog post. SPY has a daily mean return of 0.046% and daily return standard deviation of 1.179%. Derivation is in this blog post . Then, for example, a portfolio of 50% cash and 50% SPY will have a daily mean return of 0.046%/2= 0.023% and daily return standard deviation of 1.179%*/2 = 0.5895%. I want to test the above statistial theory by runing simulation. Simulator SPY and Cash have the above mentioned daily mean return and daily return standard deviation. This simulator will generate SPY pirces base on geometric Brownian Motion that stock prices follow. Then it calculate portfolio value and its daily rerun data. Finally, the porfolio daily...

Economic Data Comparison and SPY Price Modeling Based on 2015 Rate hikes

The last rate hikes happened in December, 2015. The current rate hikes are about to happen. Bellow are some economic data comparison between the 2 periods. Type 2015/12 2022/2 DXY 98.24 96.03 OIL (WTI) 35.88 93.96 10 Year Rate 2.24% 1.918% Gold 1068.80 1858.68 SPY Price Simnulation Based on 2015 Decameber to 2019 July SPY Daily Return Data. I chose the SPY closing prices from 2015/12/14 to 2019/7/15 which is approximatly the period of the last rate hikes. Then I use these closing prices to calculate the mean daily return and daily return standard deviation for simulate possible future SPY price movement. Mean daily return: Daily return standard deviation: Simulate

Do 2X or 3X Bull ETFs Give 2X or 3X Returns After Certain Periods?

Do 2X or 3X Bull ETFs Give 2X or 3X Returns After Certain Periods? In order to find out I built this app. How to use this app: Specify the target return for 1X bull ETF. Specify the number of negative returns. The system will generate the positive returns. The startin price is all $100. Click the run button to see result. App Target Retrun for 1X Bull ETF: % Number of Negative Returns: times Run End of Period Return: 1X Bull: % 2X Bull: % 3X Bull: % Returns t 1x 2x 3x Conclusion After playing this app for a while, I have found that if the 1X bull return is 0% after some time, the 2X and 3X versions still have negative returns.

Simulator for Withdrawing 4% Annually from a SPY Portfolio With Hypothetical Return Data

This is a simulator for withdrawing 4% of a SPY portfolio to see if we will be broke. SPY price follows geometric Brownian motion. SPY mean daily return is 0.037% and daily return standard deviation is 1.185%, explained in this article . Assume every year has 252 trading days, we need to covert the daily return and standard deviation to the contious form so that annual return and standard deviation can be derived mathematically. Starting Portfolio Value: Annual Withdrawing Rate: % Simulate You are broke!

Mean and Standard Deviation of Time Series Data Simulator

Mathematically, a distribution has a mean of x and a standard deviation of y, the addion of 2 independent and identically random variable from that distribution will form a distribution with a mean of 2x and standard deviation of squart root of 2 times y. I built a simulator to test if the result meets the above theory. The data I use is SPY etf mean daily return and daily return standard deviaton, which is 0.046% and 1.179% respectively and I wnat to find its annual mean return and standard deviaion. In theory, they should be SPY mean annual return is 0.046% * 252 = 11.592% SPY annual return standard deviation is 1.179% * sqrt(252) = 18.716% How it works I will use SPY's daily return mean and standard deviation to create a series of daily value and record annual value every 252 days. Then calculate the mean and standard deviaiton for the annual data. Simulated SPY mean annual return is % Simulated...

Monte Carlo Simulation for Lump Sum Investing and Dollar-Cost Averaging

 Which is better? Lump sum investing or dollar-cost averaging? O built this simulator to find out. Assumptions: Stock price follows geometric Brownian motion, or, stock return follows arithmetic Brownian motion. The variables are investment duration, we call t, mean return and return standard deviation. This simulator will run 1 time and show if one investing strategy beats the other. The target asset has a innitial value of $100. We will invest t*100 amount of money at time 0 for lump sum investing and $100 at each t. Simulator t: Mean Return: % Return Standard Deviation: % Start Compare the Investment Result With Real Date The previous app uses simulated stock prices to compare if lump sum investment givs a reutrn than dollar cost averaging. The following app uses actual SPY data. SPY tracks the SP500 index and it's an old ETF which we can use to model and compare the investment results from both investment st...

Looking Up Assets with Rising Dividends

Yahoo Finance provides ETFs, stocks and bond data, including historical stock dividends and bond ETF coupons.  I built the following tool to graph the historical dividends or coupons in order to see if they have grown. Date,Dividends 2011-03-25,0.599000 2011-06-23,0.605000 2011-09-26,0.630000 2011-12-22,0.770000 2012-03-26,0.632000 2012-06-19,0.639000 2012-09-25,0.798000 2012-12-19,0.930000 2013-03-25,0.743000 2013-06-26,0.808000 2013-09-24,0.835000 2013-12-23,0.959000 2014-03-25,0.831000 2014-06-24,0.915000 2014-09-24,0.934000 2014-12-24,1.103000 2015-03-25,1.002000 2015-06-24,1.181000 2015-09-25,1.082000 2015-12-24,1.187000 2015-12-29,0.190000 2016-06-21,0.998000 2016-09-26,1.103000 2016-12-21,1.304000 2017-03-24,1.032000 2017-06-27,1.117000 2017-09-26,1.284000 2017-12-19,1.273000 2018-03-22,1.229000 2018-06-26,1.281000 2018-09-26,1.277000 2018-12-17,1.442000 2018-12-28,0.322000 2019-03-20,1.130000 2019-06-17,1.778000 2019-09-24,1.483000 2019-12-16,2.039000 2020-03-...