Re: yield to maturity
- To: mathgroup at smc.vnet.net
- Subject: [mg41733] Re: [mg41721] yield to maturity
- From: Bobby Treat <drmajorbob+MathGroup3528 at mailblocks.com>
- Date: Tue, 3 Jun 2003 07:13:15 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
For instance, equation=Sum[ 45/(1 + r)^t , {t, 1, 15}] + 1000/(1 + r)^5 == 913 FindRoot[Evaluate@equation, {r, 0.5}] {r -> 0.110909} or (not recommended): N@Solve[equation, r] {{r -> 0.11090883131509123}, {r -> -1.8227627192379166 - 0.5982011419966071*I}, {r -> -1.8227627192379166 + 0.5982011419966071*I}, {r -> -1.665701069634478 - 0.19704106767110122*I}, {r -> -1.665701069634478 + 0.19704106767110122*I}, {r -> -1.4252967894188209 - 0.5599944757428127*I}, {r -> -1.4252967894188209 + 0.5599944757428127*I}, {r -> -1.0525585090799867 - 0.7088721229043681*I}, {r -> -1.0525585090799867 + 0.7088721229043681*I}, {r -> -0.6842891145154615 - 0.9669137082950833*I}, {r -> -0.6842891145154615 + 0.9669137082950833*I}, {r -> -0.5969758854730329 - 0.6297008825500814*I}, {r -> -0.5969758854730329 + 0.6297008825500814*I}, {r -> -0.28322629762972196 - 0.3192967143175877*I}, {r -> -0.28322629762972196 + 0.3192967143175877*I}} Bobby -----Original Message----- From: Jonathan Mann <mtheory at msn.com> To: mathgroup at smc.vnet.net Subject: [mg41733] [mg41721] yield to maturity Hi group, I need to solve for r in an equation of the form: Sum[I/(1+r)^t, {t,1,n}] + M/(1+r)^n ]==P For example's sake, let's say: Solve[ Sum[ 45/(1+r)^t ,{t,1,5}] + 1000/(1+r)^5 == 913, r] This isn't working out too well. Any ideas? Thanks, Jonathan Mann