You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Answer Given :~-2.815, -2549.33 (Price of the S&P500 --> It is negative because it was subtracted in the equation) | Correct answer (or at least intended answer): 0.073, 0
I realized the function solves perfectly for the parts where there is an x; however, it does not make f(x) = 0 (once again this could be because I did not write the code properly). Moreover, I am not sure if it is the aim of this package to set f(x) = 0. If it is your goal to solve so that f(x) = 0 this may be due to an error in your program, and if it is not you can ignore this (although that would be a useful feature to have).
Thank you for taking the time to read this, I hope it is somewhat helpful in improving your package.
The text was updated successfully, but these errors were encountered:
Sorry to be so tardy getting back. I don't know what values you used for spyearningsX to investigate. Setting all the unknown values to 1 works to find a zero. My suggestion would be to try with verbose=TRUE to get more information about the algorithm. Maybe that would lead to something we can address.
I am fairly new to Julia, and to coding in general so this may be more of an issue with my code than the package.
I was attempting to calculate an Equity Risk Premium for the US Markets, and to do so I was using this equation:
Price = (Earnings_1/(1+r)^1)+(Earnings_2/(1+r)^2)+(Earnings_3/(1+r)^3)+(Earnings_4/(1+r)^4)+(Earnings_5/(1+r)^5)+(((Earnings_5)(RiskFreeRate))/((1+r)^5)(r-RiskFreeRate))
I realized that I could solve for 0 by simply moving the price to the other side - making it a root solving program.
So, the code I wrote was:
Answer Given :~-2.815, -2549.33 (Price of the S&P500 --> It is negative because it was subtracted in the equation) | Correct answer (or at least intended answer): 0.073, 0
I realized the function solves perfectly for the parts where there is an x; however, it does not make f(x) = 0 (once again this could be because I did not write the code properly). Moreover, I am not sure if it is the aim of this package to set f(x) = 0. If it is your goal to solve so that f(x) = 0 this may be due to an error in your program, and if it is not you can ignore this (although that would be a useful feature to have).
Thank you for taking the time to read this, I hope it is somewhat helpful in improving your package.
The text was updated successfully, but these errors were encountered: