tag:blogger.com,1999:blog-16201632255190003022024-03-27T01:36:18.504-05:00Finanzas, excel, vba, sql y algo más...Blog sobre finanzas, excel, vba, sql, matemática financiera y másUnknownnoreply@blogger.comBlogger298125tag:blogger.com,1999:blog-1620163225519000302.post-1129147788591343132023-07-30T19:21:00.003-05:002023-08-10T08:23:28.143-05:00Financial Modeling - Ejercicio 12 Capítulo 1 , Rentabilidad Fondo Mutuo - Simon Benninga<p style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13.2px; text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy vamos a resolver el problema 12 del capítulo 1 del libro: <b><i><span style="color: #cc0000;">Financial Modeling - Simon Benninga.</span></i></b></span></p><p style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13.2px; text-align: justify;"><span style="font-family: arial;">12. </span><span style="font-size: 13.2px;">A mutual fund has been advertising that, had you deposited $250 per month in the fund for the last 10 years, you would now have accumulated $85,000. Assuming that these deposits were made at the beginning of each month for a period of 120 months, calculate the effective annual return fund investors got.</span></p><p style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13.2px; text-align: justify;"><span style="font-size: 13.2px;">Hint: Set up the following spreadsheet and then use Goal Seek</span><span style="font-family: arial;">.</span></p><p style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13.2px; text-align: justify;"><span style="font-family: arial;">Traducción:</span></p><p style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13.2px; text-align: justify;"><span style="font-family: arial;">12. Un fondo mutuo ha estado publicitando, que si hubieras depositado $250 al mes durante los últimos 10 años, hoy tendrías acumulados $85,000. Asumiendo que los depósitos fueron hechos al comienzo de cada mes, durante 120 meses, calcule la tasa efectiva anual retornada por el fondo en este plazo.</span></p><p style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13.2px; text-align: justify;"><span style="font-family: arial;">Pista: Utilice la funcionalidad buscar objetivo en su hoja de cálculo.</span></p><p style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13.2px; text-align: justify;"><span style="font-family: arial;">Para resolver el problema, vamos a construir el siguiente modelo financiero en </span><b style="font-family: arial; font-size: 13.2px;"><i><span style="color: #3d85c6;">G</span><span style="color: #cc0000;">o</span><span style="color: #f1c232;">o</span><span style="color: #3d85c6;">g</span><span style="color: #cc0000;">l</span><span style="color: #6aa84f;">e</span><span style="color: #cc0000;"> Sheets:</span></i></b></p><p style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13.2px; text-align: justify;"><b style="font-family: arial; font-size: 13.2px;"><i></i></b></p><div class="separator" style="clear: both; text-align: center;"><b style="font-family: arial; font-size: 13.2px;"><i><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-s3_r_RMj73qV8sIQtIyITDalE-eBBH-dQMs0GgXqLFpPg5Hq0EGpx5dWMcrdG_SenifnHM3qqvWbZ_1WQmRY3vQO2dBmXCohs9coFC6oaXILzjp45uUiWDL1nMdmc2BXbvs-OYiy2Eg_UK5NjVfZguhSU9uRGmkYMh2eKS7wWG9-2TgQBwfptNVaxBb5/s2732/IMG_0710.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-s3_r_RMj73qV8sIQtIyITDalE-eBBH-dQMs0GgXqLFpPg5Hq0EGpx5dWMcrdG_SenifnHM3qqvWbZ_1WQmRY3vQO2dBmXCohs9coFC6oaXILzjp45uUiWDL1nMdmc2BXbvs-OYiy2Eg_UK5NjVfZguhSU9uRGmkYMh2eKS7wWG9-2TgQBwfptNVaxBb5/w640-h480/IMG_0710.png" width="640" /></a></i></b></div><b style="font-family: arial; font-size: 13.2px;"><i><br /><span style="color: #cc0000;"><br /></span></i></b><p></p><p style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13.2px; text-align: justify;"><b style="font-family: arial; font-size: 13.2px;"><i></i></b></p><div class="separator" style="clear: both; text-align: center;"><b style="font-family: arial; font-size: 13.2px;"><i><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisCsW6MtACkdDoCmdZU6SAVpNR4UbeR62SQl3fW6gk49srA9EGcI5HSUG2bRwSzDk3FH_NzZrbOSr3-K5ig2NlZcoEHjHqWZlH-VDpCZfZ9Wh691C1WalV99hPgnch8pHJSxqbbXFglAjqflWqI3P9yaGgrtUxS8vVE9L4jBbONJmwqNz-beBIke1dqc_H/s2732/IMG_0711.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisCsW6MtACkdDoCmdZU6SAVpNR4UbeR62SQl3fW6gk49srA9EGcI5HSUG2bRwSzDk3FH_NzZrbOSr3-K5ig2NlZcoEHjHqWZlH-VDpCZfZ9Wh691C1WalV99hPgnch8pHJSxqbbXFglAjqflWqI3P9yaGgrtUxS8vVE9L4jBbONJmwqNz-beBIke1dqc_H/w640-h480/IMG_0711.png" width="640" /></a></i></b></div><b style="font-family: arial; font-size: 13.2px;"><i><br /><span><a name='more'></a></span></i></b><p></p><p style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13.2px; text-align: justify;"><span style="font-family: arial; font-size: 13.2px;">Ahora, vamos a utilizar buscar objetivo</span><span style="font-family: arial; font-size: 13.2px;"> de la siguiente manera:</span></p><p style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13.2px; text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFByccgq28hE5YqTqy0xXt2PMnnPBI0GL3-FzynlUqiQbxFhURKjdtSbKM1itcfJwjpIHE-gwB__I__0fUWNhn3cRhZtdVsN7HnsJxYZHBy5siqbEQrOlx282-K44eJJiPEPdJxeipDL27cgbh3MLeV_rpmlS9uk8iJQ42I0SmUWNiqjOBJr1WOwG0d5JA/s2732/IMG_0714.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFByccgq28hE5YqTqy0xXt2PMnnPBI0GL3-FzynlUqiQbxFhURKjdtSbKM1itcfJwjpIHE-gwB__I__0fUWNhn3cRhZtdVsN7HnsJxYZHBy5siqbEQrOlx282-K44eJJiPEPdJxeipDL27cgbh3MLeV_rpmlS9uk8iJQ42I0SmUWNiqjOBJr1WOwG0d5JA/w640-h480/IMG_0714.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYxl_3P826V3Zxs8pwfsnXFYl_MXtWxeM2nacc0P7fYJf8pIzIdbeA5_b8hlPPj5KgBomV9aQBoNFpALnqeYxnPRT9U4vXWO75-2kqSSz8sYa62_b8ZTek6GPx2xns-VyKVwa2XvUrUzMywduhKSRezjxbdvQdKrI4VqsYXqvsVg8x5Eb9tB3YQ5XRNdnO/s2732/IMG_0715.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYxl_3P826V3Zxs8pwfsnXFYl_MXtWxeM2nacc0P7fYJf8pIzIdbeA5_b8hlPPj5KgBomV9aQBoNFpALnqeYxnPRT9U4vXWO75-2kqSSz8sYa62_b8ZTek6GPx2xns-VyKVwa2XvUrUzMywduhKSRezjxbdvQdKrI4VqsYXqvsVg8x5Eb9tB3YQ5XRNdnO/w640-h480/IMG_0715.png" width="640" /></a></div><span style="font-family: arial; font-size: 13.2px;"><br /></span><p></p><p style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13.2px; text-align: justify;"><span style="font-family: arial; font-size: 13.2px;">Y teniendo configuradas la celda objetivo, el valor y la celda que va a cambiar damos clic en Solve:</span></p><p style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13.2px; text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH8Yw1AzkOJclJw4RECtR4vXYh00QigUbzmncTR5N8PMAecoGFY03OHovz-ZiaZOdljqWH-8tzwLXuCS4bH-aDJvYnMIDDM_c2LLLc9-iEwGqR08dYYEH1oVAFoW85v0lp54EY_KuYHLrs0n95SM0lYRQSXxurVqsuZ02fvZA-avnCglANWFdln8rzw-N1/s2732/IMG_0716.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH8Yw1AzkOJclJw4RECtR4vXYh00QigUbzmncTR5N8PMAecoGFY03OHovz-ZiaZOdljqWH-8tzwLXuCS4bH-aDJvYnMIDDM_c2LLLc9-iEwGqR08dYYEH1oVAFoW85v0lp54EY_KuYHLrs0n95SM0lYRQSXxurVqsuZ02fvZA-avnCglANWFdln8rzw-N1/w640-h480/IMG_0716.png" width="640" /></a></div><span style="font-family: arial; font-size: 13.2px;"><br /></span><p></p><p style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13.2px; text-align: justify;"><span style="font-family: arial; font-size: 13.2px;">El resultado de buscar objetivo, es que la tasa mensual que rentó el fondo durante los 120 meses fue del 1.51%. Para volverla efectiva anual, vamos a hacer lo siguiente:</span></p><p style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13.2px; text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSAsx0EuoxMRI2gTdd8qbPvymRPjjvs2LbSnOGX-WwlTFDHk6tIlsVU838DRRAaTqqjbxMwZWZXCDzGrZKd6LIxYNysKPIOb3DJM6TxjMy5AH5HD_7VHlemDErdnFRvc9YwFyskIW1HBfqM2dCAiCMTS7KEd2a9heP8iEeQgzfhcnqe6dsmRCUXtR_Wy5D/s2732/IMG_0717.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSAsx0EuoxMRI2gTdd8qbPvymRPjjvs2LbSnOGX-WwlTFDHk6tIlsVU838DRRAaTqqjbxMwZWZXCDzGrZKd6LIxYNysKPIOb3DJM6TxjMy5AH5HD_7VHlemDErdnFRvc9YwFyskIW1HBfqM2dCAiCMTS7KEd2a9heP8iEeQgzfhcnqe6dsmRCUXtR_Wy5D/w640-h480/IMG_0717.png" width="640" /></a></div><span style="font-family: arial; font-size: 13.2px;"><p style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: "Trebuchet MS", Trebuchet, Verdana, sans-serif; font-size: 13.2px; text-align: justify;"><span style="font-family: arial; font-size: 13.2px;"><br /></span></p>Hasta la próxima.</span><p></p>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-55061723700105653112023-07-11T15:01:00.003-05:002023-07-30T18:58:19.460-05:00Financial Modeling - Ejercicio 11 Capítulo1 , Plan de Ahorros Pago Inicio Año - Simon Benninga<p style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy vamos a resolver el problema 11 del capítulo 1 del libro: <b><i><span style="color: #cc0000;">Financial Modeling - Simon Benninga.</span></i></b></span></p><p style="text-align: justify;"><span style="font-family: arial;">11. Redo the previous calculation, this time assuming that you make 5 deposits at the beginning of this year and the following 4 years. How much will you accumulate by the end of year 5.</span></p><p style="text-align: justify;"><span style="font-family: arial;">Traducción:</span></p><p style="text-align: justify;"><span style="font-family: arial;">11. Realice nuevamente los cálculos del problema número 10, esta vez asuma que los depósitos se realizan al inicio de este año y al inicio de los siguientes 4. Cuánto tendrá acumulado al final del año 5?</span></p><p style="text-align: justify;"><span style="font-family: arial;">Para resolver el problema, vamos a construir el siguiente modelo financiero en </span><b style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: arial; font-size: 13.2px;"><i><span style="color: #3d85c6;">G</span><span style="color: #cc0000;">o</span><span style="color: #f1c232;">o</span><span style="color: #3d85c6;">g</span><span style="color: #cc0000;">l</span><span style="color: #6aa84f;">e</span><span style="color: #cc0000;"> Sheets:</span></i></b></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ1YKi-OOUHLzcFDaD0ZF0tnjq1nlsr7yzksrte9oQd27lMZnNbORbWahHN8eKpjVrHZibdXZ3pTTdiblD6Wu4v8zxaF-I0L6iaDOlEpNWDAVBSojJjpfQ63NmlIlVPF-qUWBdkhZiJxyVb_VUBkB7MuAOky--yZEJ68qBVwK3SdDt1O7oTafZMJ65Cw/s2732/F53F746D-5ACC-4886-AB87-8DAE9050F961.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ1YKi-OOUHLzcFDaD0ZF0tnjq1nlsr7yzksrte9oQd27lMZnNbORbWahHN8eKpjVrHZibdXZ3pTTdiblD6Wu4v8zxaF-I0L6iaDOlEpNWDAVBSojJjpfQ63NmlIlVPF-qUWBdkhZiJxyVb_VUBkB7MuAOky--yZEJ68qBVwK3SdDt1O7oTafZMJ65Cw/w640-h480/F53F746D-5ACC-4886-AB87-8DAE9050F961.png" width="640" /></a></div><br /><span style="font-family: arial;">En este cálculo, se nos forma una referencia circular. Veamos la formulación del modelo:</span><p></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguEZv8inK7Guhg4NThCLtUmwEW-3rvNPXd3vqEl-Gzz-UNoVLFjTmUM8afhyBcO8EGzEsc22vbjNkOItJpP9XLx-aJ0xP6M94MC7Gg5fvzfWkaDhIIE5vrLSPHigDYV1FW_epEraQQXUzk4lu6V4-6aK9zUP3iEGu_G_1hdKL3NjikszGqdqPYjYGUKA/s2732/45CA53C8-9242-45F9-BC75-96D6CE274BB8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguEZv8inK7Guhg4NThCLtUmwEW-3rvNPXd3vqEl-Gzz-UNoVLFjTmUM8afhyBcO8EGzEsc22vbjNkOItJpP9XLx-aJ0xP6M94MC7Gg5fvzfWkaDhIIE5vrLSPHigDYV1FW_epEraQQXUzk4lu6V4-6aK9zUP3iEGu_G_1hdKL3NjikszGqdqPYjYGUKA/w640-h480/45CA53C8-9242-45F9-BC75-96D6CE274BB8.png" width="640" /></a></div><br /><span style="font-family: arial;">La referencia circular, se forma porque decimos que la celda B8 es igual a B7 + C8 + D8. Cuando miramos la fórmula en D8, esta es igual a B8 * $B$2, entonces, para calcular B8, necesitamos calcular D8, pero para calcular D8, necesitamos calcular primero B8. Por esto se produce la referencia circular.</span><p></p><p style="text-align: justify;"><span style="font-family: arial;">Para resolver, vamos a activar el cálculo iterativo de la siguiente manera:</span></p><p style="text-align: justify;"><span></span></p><a name='more'></a><span style="font-family: arial;"><br /></span><p></p><p style="text-align: justify;"><span style="font-family: arial;"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZWsJf4rrTwE2P3DFgkSkwQ_j6ZA9lxkvWGL7QboYuReHbOgQc4dMBh2CtnYjJNUL5dLPv_J01DEv2gJhALG-TM9Fcyd33eFmz7dEilL_wqqozewTRsdX5q2kD0uYo1tdAsTXZMBIN6_qcnsFfUcM92pPFCtAzCHliZVsYaYG1Kp3FPh2WZv1-k0yxUA/s2732/5A668BC6-50DE-4CDC-AB60-CDA8BCDC1E51.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZWsJf4rrTwE2P3DFgkSkwQ_j6ZA9lxkvWGL7QboYuReHbOgQc4dMBh2CtnYjJNUL5dLPv_J01DEv2gJhALG-TM9Fcyd33eFmz7dEilL_wqqozewTRsdX5q2kD0uYo1tdAsTXZMBIN6_qcnsFfUcM92pPFCtAzCHliZVsYaYG1Kp3FPh2WZv1-k0yxUA/w640-h480/5A668BC6-50DE-4CDC-AB60-CDA8BCDC1E51.png" width="640" /></a></div><br /><br /><p></p><p style="text-align: justify;"><span style="font-family: arial;"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7dmbSoPKBP_DHGFRQgY-AEoPIJZW80HXzTuhSX1tVj40jmYSziqb4-nHkhPBcYNsdPmIskPm3ran4NllugIUWkkkv7JPueVdIk00TikMgzcMrUA7nURHmZVQcjVGjZRJCAeVRgdm8vA5bXoXmD8J--IkxFKRznDP85--EVhTubrpZgjxylk4CBi8TlQ/s2732/CBB3CBFF-0472-45F1-A797-C6918527F6A5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7dmbSoPKBP_DHGFRQgY-AEoPIJZW80HXzTuhSX1tVj40jmYSziqb4-nHkhPBcYNsdPmIskPm3ran4NllugIUWkkkv7JPueVdIk00TikMgzcMrUA7nURHmZVQcjVGjZRJCAeVRgdm8vA5bXoXmD8J--IkxFKRznDP85--EVhTubrpZgjxylk4CBi8TlQ/w640-h480/CBB3CBFF-0472-45F1-A797-C6918527F6A5.png" width="640" /></a></div><br /> <p></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvCoH9iHlyMyI7XQgEioHKT7H2loRSnLQZn9uH5o92B3MJX_A9tUTdlbRnYtH6Y3qUEQwzXoQCZ3ruJ_WHfZgXMs42L5i0-lpMJpZ135_24xlQx8N8KmBzg5Ha-pDCiIaSWEi2XINLKwUIiRgIlyECHna7lp_Z79tNVgcxAn9-3t0RJURaUupUeXk-Og/s2732/4B4687F5-F4F5-4750-87DE-F3EC40213055.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvCoH9iHlyMyI7XQgEioHKT7H2loRSnLQZn9uH5o92B3MJX_A9tUTdlbRnYtH6Y3qUEQwzXoQCZ3ruJ_WHfZgXMs42L5i0-lpMJpZ135_24xlQx8N8KmBzg5Ha-pDCiIaSWEi2XINLKwUIiRgIlyECHna7lp_Z79tNVgcxAn9-3t0RJURaUupUeXk-Og/w640-h480/4B4687F5-F4F5-4750-87DE-F3EC40213055.png" width="640" /></a></div><br /><span style="font-family: arial;"><br /></span><p></p><p style="text-align: justify;"><span style="font-family: arial;">Como pueden ver, al activar al cálculo iterativo, nuestro modelo logra llegar a la solución del problema:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe_XB0vDLlG4kdOvUdCo5LPt4udYgvVR1sde-ZkN__gK5ypmDz3Fn8Adyx0lvTnGJUvqRgpQennaY4b6H6Bk1gRyO81mdsBM-jqEf1lmBZfFjfvK8zfT1UIvq5aQN-Ftqrz-rl5AFxmH5_FmvaVlVdoJeLeB2FBCUIS2wQOrRgQtIKLTiG3GNEZUOI2w/s2732/863E2093-ABCB-4EEA-BA9F-EE9A14D6C76D.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe_XB0vDLlG4kdOvUdCo5LPt4udYgvVR1sde-ZkN__gK5ypmDz3Fn8Adyx0lvTnGJUvqRgpQennaY4b6H6Bk1gRyO81mdsBM-jqEf1lmBZfFjfvK8zfT1UIvq5aQN-Ftqrz-rl5AFxmH5_FmvaVlVdoJeLeB2FBCUIS2wQOrRgQtIKLTiG3GNEZUOI2w/w640-h480/863E2093-ABCB-4EEA-BA9F-EE9A14D6C76D.png" width="640" /></a></div><div><br /></div><span style="font-family: arial;">Hasta la próxima.<br /></span><p></p><p style="text-align: justify;"><span style="font-family: arial;"> . </span></p>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-36066424561314017862023-04-22T08:47:00.015-05:002023-04-22T15:05:36.311-05:00Libro: Las claves del éxito de Toyota, Jeffrey K. Liker <p style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy voy a dar mis impresiones sobre el libro: <b><i><span style="color: #cc0000;">Las claves del éxito de Toyota, del autor: Jeffrey K. Liker.</span></i></b></span></p><p style="text-align: justify;"><span style="font-family: arial;"><b><i></i></b></span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: arial;"><b><i><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC59Kdujai3FuhRz39_KwSH2uI8yh6NZ65SXptBX7_eZcVWEPZ3dwN8FWZlrWTN6JhKFoK-nMmh3eSG9XSmJNb_Gk1uoXnEyDZiOUaObA9_fqpq1TloelnYjBFrNk3w1-2Bzxhpkxa5NTMZ2DwYwM8ALKMxqYpNonr0DnS2yuBuBiHzv51ciNgapgIjw/s1000/IMG_0551.webp" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1000" data-original-width="800" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC59Kdujai3FuhRz39_KwSH2uI8yh6NZ65SXptBX7_eZcVWEPZ3dwN8FWZlrWTN6JhKFoK-nMmh3eSG9XSmJNb_Gk1uoXnEyDZiOUaObA9_fqpq1TloelnYjBFrNk3w1-2Bzxhpkxa5NTMZ2DwYwM8ALKMxqYpNonr0DnS2yuBuBiHzv51ciNgapgIjw/w512-h640/IMG_0551.webp" width="512" /></a></i></b></span></div><span style="font-family: arial;">Lo primero es que desde siempre me he sentido atraído por los temas de </span><b style="font-family: arial;"><i>mejora continua, la revisión constante de los procesos y el reto asociado a la optimización y transformación de los mismos.</i></b><p></p><p style="text-align: justify;"><span style="font-family: arial;">En este libro, se puede comprender como la empresa <b><i><span style="color: #cc0000;">Toyota</span></i></b> logra a partir de la construcción de unas sólidas bases culturales, despertar en sus colaboradores de todos los niveles la necesidad permanente de revisar sus operaciones y procesos con el ánimo de desafiarlos y mejorarlos.</span></p><p style="text-align: justify;"><span style="font-family: arial;">Para lograrlo, el <i><b>CEO</b></i> de la empresa se convierte en el sponsor de más alto nivel del programa, definiendo así para toda la empresa la importancia y relevancia que este tiene para lograr el cumplimiento de los objetivos organizacionales.</span></p><p style="text-align: justify;"><span style="font-family: arial;">En esencia su método es sencillo:</span></p><p style="text-align: justify;"><span style="color: #cc0000; font-family: arial;"><b><i>1. Identificar el problema.</i></b></span></p><p style="text-align: justify;"><span style="color: #cc0000; font-family: arial;"><b><i>2. Buscar la causa raíz </i></b></span></p><p style="text-align: justify;"><span style="color: #cc0000; font-family: arial;"><b><i>3. Implementar la mejora y controlar la solución</i></b></span></p><p style="text-align: justify;"><span style="color: #cc0000; font-family: arial;"><b><i>4. Por último: Iterar y seguir subiendo el listón de la calidad.</i></b></span></p><p style="text-align: justify;"><span style="font-family: arial;">Para aplicarlo, se exige algo simple y poderoso: ¡Ir al lugar del problema! No es de otra forma que se pueden entender los desafíos y retos por los que pasa una operación o proceso. </span></p><p style="text-align: justify;"><span style="font-family: arial;">Que te lo cuenten no es suficiente y te puedes quedar con una versión distorsionada de los hechos. Debes ir al terreno, observar, entender y validar, solo así vas a poder tener claramente y de primera mano los hechos y datos de la situación.</span></p><p style="text-align: justify;"><span style="font-family: arial;"><span></span></span></p><a name='more'></a><span style="font-family: arial;">Hay una parte del libro en la que se menciona la capacidad de enfoque y concentración en entender los problemas, adoptada por el CEO de la empresa y como él llevaba a sus ejecutivos a la planta, encerrándolos en un pequeño circulo que el mismo dibujaba en el piso, pidiéndoles que se dedicaran a observar el proceso, para que pudieran conversar después sobre sus observaciones y apreciaciones.</span><p></p><p style="text-align: justify;"><span style="font-family: arial;">“El lugar más peligroso para conocer el mundo es el escritorio”, le escuché decir una vez al presidente de Odinsa. Tiene toda la razón.</span></p><p style="text-align: justify;"><span style="font-family: arial;">La administración de la empresa se encarga de hacer que el modelo Toyota se adopte en toda la cadena de valor de la compañía. Sus proveedores, agencias y talleres, hacen parte de este gran esfuerzo, y practican en su día a día la filosofía de la mejora continua. </span></p><p style="text-align: justify;"><span style="font-family: arial;">Solo así, pueden llegar a dominar técnicas tan críticas y complejas de implementar como el <i><b><span style="color: #cc0000;">Justo a Tiempo y la optimización de los inventarios</span>.</b></i> Actividades que cuando se llevan al nivel de excelencia, liberan caja atrapada en las operaciones y se traducen en procesos rápidos y livianos que cumplen con las expectativas de los clientes.</span></p><p style="text-align: justify;"><span style="font-family: arial;">Después de leer el libro, tuve la fortuna de conocer una agencia <span style="color: #cc0000;"><b><i>Toyota</i></b></span> y conversar con su líder de calidad sobre el libro, la forma en que se vive la mejora continua </span><span style="font-family: arial;">en la empresa, los lineamientos que les llegan desde Japón y como todo esto se va volviendo algo natural en el día a día de la empresa.</span></p><p style="text-align: justify;"><span style="font-family: arial;">Por último, para la empresa, sus decisiones siempre se toman pensando en el beneficio de largo plazo, más que en el de corto.</span></p><p style="text-align: justify;"><span style="font-family: arial;">Estos son los 14 principios del modelo:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikqS_pXYZw2obRLKD-f2E5Ne6_RYANg8icNaiixJAP50P0oD1wKUi5ADiIQejPaAw3N0ikPF-Vxy2JbePCh5qP18OkyKGuj8wsWhxxcv6D-jhydkBpCsrOiipeFdkZN7_pj6Q_xeXgj6ottXet9HQr9msph1_Cur1AHVqcV12BGoP1v_oOQS27oWr2zw/s2732/IMG_0550.jpeg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1800" data-original-width="2732" height="422" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikqS_pXYZw2obRLKD-f2E5Ne6_RYANg8icNaiixJAP50P0oD1wKUi5ADiIQejPaAw3N0ikPF-Vxy2JbePCh5qP18OkyKGuj8wsWhxxcv6D-jhydkBpCsrOiipeFdkZN7_pj6Q_xeXgj6ottXet9HQr9msph1_Cur1AHVqcV12BGoP1v_oOQS27oWr2zw/w640-h422/IMG_0550.jpeg" width="640" /></a></div><br /><span style="font-family: arial;"><br /></span><p></p><p style="text-align: justify;"><span style="font-family: arial;">Libro recomendado para todos los que se les dibuja una sonrisa cuando escuchan: Mejora Continua! </span></p>Unknownnoreply@blogger.com1Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-24491604872866699852022-06-22T18:58:00.007-05:002022-06-23T07:26:52.160-05:00Financial Modeling - Ejercicio 10 Capítulo1 , Plan de Ahorros - Simon Benninga<p style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy vamos a resolver el ejercicio número 10 del capítulo 1, del libro: <b><i><span style="color: #cc0000;">Financial Modeling - Simon Benninga</span></i></b> y que tiene el siguiente planteamiento:</span></p><p style="text-align: justify;"><span style="font-family: arial;">10. <span style="text-align: left;">You are considering a savings plan which calls for a deposit of $15,000 at the end of each of the next 5 years. If the plan offers an interest rate of 10%, how much will you accumulate at the end of year 5? Do this calculation by completing the following spreadsheet. </span></span></p><p style="text-align: justify;"><span style="font-family: arial;"></span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: arial;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKfY_c4L9FrFcocKllNHR5tKv0-l0uhqSefj7YMWo_URcum1-ukFGdk4fubShZDSkk8s8RLskRa-cBnrPRbDSH6u-dPEvSoK-Pm46n7QiKwBKk51cKV6i37gMfdJQAJ2sh9SsCw0Isjf2OtiNGkonLbFtyyh6c4bnh14g67XO6OA1n25KDHVm5tvOJMQ/s2204/195809A1-E6B1-45A4-8E17-20B7DD210FA1.jpeg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="946" data-original-width="2204" height="274" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKfY_c4L9FrFcocKllNHR5tKv0-l0uhqSefj7YMWo_URcum1-ukFGdk4fubShZDSkk8s8RLskRa-cBnrPRbDSH6u-dPEvSoK-Pm46n7QiKwBKk51cKV6i37gMfdJQAJ2sh9SsCw0Isjf2OtiNGkonLbFtyyh6c4bnh14g67XO6OA1n25KDHVm5tvOJMQ/w640-h274/195809A1-E6B1-45A4-8E17-20B7DD210FA1.jpeg" width="640" /></a></span></div><span style="font-family: arial; text-align: left;"><p style="text-align: justify;"><span style="font-family: arial; text-align: left;"><b>Tabla 1.</b></span></p><div style="text-align: justify;">This spreadsheet does the calculation twice—once using the FV function and once using a simple table which shows the accumulation at the beginning of each year.</div></span><p></p><p style="text-align: justify;"><span style="color: #38761d; font-family: arial; text-align: left;"><b>Traducción:</b></span></p><p style="text-align: justify;"><span style="font-family: arial;">10. Usted esta considera realizar un plan de ahorros que se compone de depósitos de $15,000 al final de cada uno de los próximos 5 años. Si el plan le ofrece una tasa de interés del 10%, cuál será el valor que le entregará este plan al final del quinto año? Realice el calculo construyendo una hoja de calculo como la de la tabla 1. </span></p><p style="text-align: justify;"><span style="font-family: arial;">Como puede ver, este modelo realiza el calculo de dos maneras: la primera es usando <b><i><span style="color: #cc0000;">la función VF (valor futuro)</span></i></b> y la segunda es mediante el calculo compuesto año a año.</span></p><p style="text-align: justify;"><span style="font-family: arial;">Para resolver este ejercicio, vamos a elaborar el siguiente modelo financiero en </span><b style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: arial; font-size: 13.199999809265137px;"><i><span style="color: #3d85c6;">G</span><span style="color: #cc0000;">o</span><span style="color: #f1c232;">o</span><span style="color: #3d85c6;">g</span><span style="color: #cc0000;">l</span><span style="color: #6aa84f;">e</span><span style="color: #cc0000;"> Sheets.</span></i></b></p><p style="text-align: justify;"><b style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: arial; font-size: 13.199999809265137px;"><i></i></b></p><div class="separator" style="clear: both; text-align: center;"><b style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: arial; font-size: 13.199999809265137px;"><i><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjouEjH3b7_FdB0E2_7TgdKRxXGCHoQ50ajBp3qZI1raapT98tUyLDAMLHuN8AyChIY5Yvq_rYbWP3stwkvj4Q_XjfN-54m4fQWXX7M8ZgszlcN6a3AqMhZV3rIzZzyOvZN9o4z1HVn0Tz_PunIfCvDMmEHDq63hDPSXXlPL43ch3D02gpz1dSBOubyAQ/s2732/EC501099-3D73-4ADF-B934-01FE32F604CA.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjouEjH3b7_FdB0E2_7TgdKRxXGCHoQ50ajBp3qZI1raapT98tUyLDAMLHuN8AyChIY5Yvq_rYbWP3stwkvj4Q_XjfN-54m4fQWXX7M8ZgszlcN6a3AqMhZV3rIzZzyOvZN9o4z1HVn0Tz_PunIfCvDMmEHDq63hDPSXXlPL43ch3D02gpz1dSBOubyAQ/w640-h480/EC501099-3D73-4ADF-B934-01FE32F604CA.png" width="640" /></a></i></b></div><b style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: arial; font-size: 13.199999809265137px;"><i><br /><br /></i></b><p></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6cGcBlnlbdKDLYwi4aWQ947OuxHvD3nfQRUo5dIR_zk8Uk3RLzRPKKi0uVNoD8ydt9gxZ9-SY9_TZvw4H0tunE5zjxQU_kvfcbTpZCNykB_MgnoQV1-qaxc3wf4y5CV3SAtkWSIqP-uv_075YRrkGSZVDt53bN6pDyt0ykWMOQyZRPSGhDU8iTjterA/s2732/AD7A3357-496F-4776-9874-E37818E0403A.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6cGcBlnlbdKDLYwi4aWQ947OuxHvD3nfQRUo5dIR_zk8Uk3RLzRPKKi0uVNoD8ydt9gxZ9-SY9_TZvw4H0tunE5zjxQU_kvfcbTpZCNykB_MgnoQV1-qaxc3wf4y5CV3SAtkWSIqP-uv_075YRrkGSZVDt53bN6pDyt0ykWMOQyZRPSGhDU8iTjterA/w640-h480/AD7A3357-496F-4776-9874-E37818E0403A.png" width="640" /></a></div><br /><span style="font-family: arial;">Como podemos ver, el total que se acumula en el plan de ahorros, al final del quinto año es de $91,576.50.</span><p></p><p style="text-align: justify;"><span style="font-family: arial;">Hasta la próxima.</span></p>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-39866958997287631202022-06-19T12:14:00.004-05:002022-06-19T12:43:09.215-05:00Financial Modeling - Ejercicio 9 Capítulo1 , Compra de vehículo usando Google Sheets y Python ¿Financiado o al contado? - Simon Benninga<div style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy vamos a retomar los ejercicios del libro: <b><i><span style="color: #cc0000;">Financial Modeling - Simmon Benninga.</span></i></b> El día de hoy, resolveremos el ejercicio 9 del capítulo 1, que dice así:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div><div style="text-align: justify;"><span style="font-family: arial;">9. </span><span style="-webkit-text-size-adjust: auto; font-family: arial;">You are considering buying a car from a local auto dealer. The dealer offers you one of two payment options:</span></div><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;"><br /></span></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;">• You can pay $30,000 cash.</span></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;"><br /></span></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;">• The “deferred payment plan”: You can pay the dealer $5,000 cash today and a payment of $1,050 at the end of each of the next 30 months.</span></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;"><br /></span></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;">As an alternative to the dealer financing, you have approached a local bank, which is willing to give you a car loan of $25,000 at the rate of 1.25% per month.</span></span></p><p style="text-align: justify;"><span style="font-family: arial;"> <span style="-webkit-text-size-adjust: auto;">a. Assuming that 1.25% is the opportunity cost, calculate the present value of all the payments on the dealer’s deferred payment plan.</span></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;">b. What is the effective interest rate being charged by the dealer? Do this calculation by preparing a spreadsheet like this (only part of the spreadsheet is shown—you have to do this calculation for all 30 months):</span></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;"><br /></span></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYqHU5u49iMqAowpJTo5EE39R744s-goGDwLFO2Y2ATX2sS4W2-ZEFmLWWE25yciggzNbdTF8BUYRn3zwJr1tiuIAtE1ALBwNi7JejCVbnELgP0-kVLAka6itzWiZi9PTrAb2emo2Vh2jUwqzDjTiVkvRInxBqAEXARG5ll8MN1QgMQUnfYshFa0krzg/s2732/BB9DA14C-6A8C-4607-A121-9A6615940D87.jpeg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1120" data-original-width="2732" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYqHU5u49iMqAowpJTo5EE39R744s-goGDwLFO2Y2ATX2sS4W2-ZEFmLWWE25yciggzNbdTF8BUYRn3zwJr1tiuIAtE1ALBwNi7JejCVbnELgP0-kVLAka6itzWiZi9PTrAb2emo2Vh2jUwqzDjTiVkvRInxBqAEXARG5ll8MN1QgMQUnfYshFa0krzg/w640-h262/BB9DA14C-6A8C-4607-A121-9A6615940D87.jpeg" width="640" /></a></div><p></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;">Tabla 1.</span></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;"><br /></span></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;">Now calculate the IRR of the difference column; this is the monthly effective interest rate on the deferred payment plan.</span></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;"><br /></span></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="color: #38761d; font-family: arial;"><b><i>Traducción:</i></b></span></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;"><br /></span></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;">Usted esta considerando comprar un carro en una agencia local. El vendedor le ofrece las siguientes dos opciones de pago para adquirirlo:</span></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;"><br /></span></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;">1. Pagar $30,000 en efectivo.</span></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;">2. Financiar la compra así: Pagar $5,000 en efectivo y realizar pagos de $1,050 al final de cada </span></span><span style="font-family: arial;">mes durante los siguientes 30 meses.</span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;"><br /></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;">Como una alternativa al plan de financiación ofrecido por la agencia, usted ha contactado un banco local, que le ofrece prestarle los $25,000 a una tasa del 1.25% mensual.</span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;"><br /></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;">a. Asumiendo que el costo de oportunidad es el 1.25%, calcule el valor presente de todos los pagos realizados a la agencia en el plan de financiación.</span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;"><br /></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;">b. Cuál es la tasa efectiva cobrada por la agencia? Realice el cálculo en una hoja de cálculo como la de la <b><i><span style="color: #cc0000;">Tabla 1</span></i></b>.</span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;"><br /></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;">Calcule la TIR para la columna diferencia. Esa es la tasa mensual efectiva de la financiación ofrecida por el vendedor.</span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;"><br /></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;">Para resolver el problema, vamos a construir el siguiente modelo financiero en </span><b style="caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: arial; font-size: 13.199999809265137px;"><i><span style="color: #3d85c6;">G</span><span style="color: #cc0000;">o</span><span style="color: #f1c232;">o</span><span style="color: #3d85c6;">g</span><span style="color: #cc0000;">l</span><span style="color: #6aa84f;">e</span><span style="color: #cc0000;"> Sheets</span></i></b><span style="font-family: arial;">:</span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;"><br /></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikaA-L-GnexYRZ6fKQD5aWffY_jWNCS-kIIkqllJZAVrr44lTKHfZ7dwy_eY6oV-dwtM9woW3K4Ngmy5KGXtNmHa6uOiAVzmWG4be5eiQAkYmMJ5U6N2shVjTLGuHOHieLeldIU6wDunnFn1VndXlg9ECOpaUG-65jOs1IAFmK8Q3CMVg6E_eaYaSWlQ/s2732/B33262D5-82DC-46DA-946D-E217E9F89BF5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikaA-L-GnexYRZ6fKQD5aWffY_jWNCS-kIIkqllJZAVrr44lTKHfZ7dwy_eY6oV-dwtM9woW3K4Ngmy5KGXtNmHa6uOiAVzmWG4be5eiQAkYmMJ5U6N2shVjTLGuHOHieLeldIU6wDunnFn1VndXlg9ECOpaUG-65jOs1IAFmK8Q3CMVg6E_eaYaSWlQ/w640-h480/B33262D5-82DC-46DA-946D-E217E9F89BF5.png" width="640" /></a></div><br /><span style="font-family: arial;">Como podemos ver, al calcular el <b><i><span style="color: #cc0000;">VPN</span></i></b> de los flujos del plan de financiación y descontarlos con la tasa del costo de oportunidad del 1.25%, estamos llegando a un valor más alto de los $30,000 que vale el vehículo. Esto quiere decir, que la tasa que cobra la agencia, es más alta que nuestro costo de oportunidad (tasa ofrecida por el banco).</span></div><div><span></span><span><a name='more'></a></span><span style="font-family: arial;"><br /></span><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;">Para confirmarlo, calculamos la <b><i><span style="color: #cc0000;">TIR</span></i></b> en la diferencia de los flujos de caja(ver celda G3). Entonces, la tasa ofrecida por la agencia es del 1.56% que es más alta que la ofrecida por el banco, por lo que deberíamos pagar los $5,000 de cuota inicia y financiar los $25,000 con nuestro banco local.</span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;"><br /></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;">Ahora, vamos a resolver el mismo problema utilizando <b><i><span style="color: #cc0000;">Python</span></i></b> con el siguiente script que escribimos en la plataforma <b><i><span style="color: #cc0000;">Google Colab</span></i></b>:</span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;"><br /></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1b_bP0AJbHRtKYViS5ztDmHE0au42W9bNSRip5p0pXp3zR0oGKziPXkHwe6Ubl6fZPfMGaWh8ieTy-RBC0egpVw6k5klCLGy6mkPb_3_i7XnSU5Pcq7xIpxauqbM8Azyz7cZ_FoZt1siIH9nx2ayabl-U3fcVhZa-L2lqS09A6vKxXVb4BHcpjmbk2w/s2732/D79B5DE2-1F5B-41F0-B3CC-C62BFC2D474F.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1b_bP0AJbHRtKYViS5ztDmHE0au42W9bNSRip5p0pXp3zR0oGKziPXkHwe6Ubl6fZPfMGaWh8ieTy-RBC0egpVw6k5klCLGy6mkPb_3_i7XnSU5Pcq7xIpxauqbM8Azyz7cZ_FoZt1siIH9nx2ayabl-U3fcVhZa-L2lqS09A6vKxXVb4BHcpjmbk2w/w640-h480/D79B5DE2-1F5B-41F0-B3CC-C62BFC2D474F.png" width="640" /></a></div><br /><span style="font-family: arial;">Y al ejecutarlo tenemos:</span><p></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;"><br /></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGCdY4Ud_DBcd34iRs5hPnd3r-8vEE__aVj38nXfYyX6pt-SS_NVMVZiicUytav-Msr87v2nRK6x-P1qzhhsknW-FEVggZi_ejd-9J-FWMEtUUbIinlckleoLg3i0jY07NiNi5d5aQNCZhoL6-M29t4ftu4w92oSgnLYtGYence1jjfBVK8S30FuLbaA/s2732/5BEAED71-DD9A-42AB-9BC1-DD42ABADAB88.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGCdY4Ud_DBcd34iRs5hPnd3r-8vEE__aVj38nXfYyX6pt-SS_NVMVZiicUytav-Msr87v2nRK6x-P1qzhhsknW-FEVggZi_ejd-9J-FWMEtUUbIinlckleoLg3i0jY07NiNi5d5aQNCZhoL6-M29t4ftu4w92oSgnLYtGYence1jjfBVK8S30FuLbaA/w640-h480/5BEAED71-DD9A-42AB-9BC1-DD42ABADAB88.png" width="640" /></a></div><br /><span style="font-family: arial;">Como podemos ver, llegamos al mismo valor para el <b><i><span style="color: #cc0000;">VPN y para la TIR</span></i></b>.</span><p></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;"><br /></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;">A continuación el código fuente:</span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;"><br /></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span style="font-family: arial;"><script src="https://gist.github.com/edualzate/6ed3fe23f51aec8c1db53fd79c0c3997.js"></script></span></p><p class="p1" style="-webkit-text-size-adjust: auto; font-stretch: normal; line-height: normal; margin: 0px; text-align: justify;"><span class="s1"><span style="font-family: arial;"><br /></span></span></p></div>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-35903400678081517092022-06-12T18:07:00.002-05:002022-06-14T16:41:32.099-05:00Usar pandas_datareader de Python para conectarnos a Yahoo Finance y extraer los precios de los activos que necesitemos.<p style="text-align: justify;"><span style="font-family: arial;">Hola a todos, en un post del 17 de julio de 2019, mostré los pasos para extraer la información de precios de un activo cualquiera, usando como fuente <a href="http://finance.yahoo.com">finance.yahoo.com</a>, el proceso era bastante manual, y consistía en ingresar unos parámetros de la data a descargar, bajarla como un archivo separado por comas y luego abrirlo en excel para separar las columnas y poder organizarlo. </span></p><p style="text-align: justify;"><span style="font-family: arial;">Esta operatividad, la debíamos realizar para cada activo del que queríamos obtener los datos. </span></p><p style="text-align: justify;"><span style="font-family: arial;">Este paso a paso fue con el que aprendimos en la especialización en finanzas en la Universidad EAFIT, por allá en el año 2012.</span></p><p style="text-align: justify;"><span style="font-family: arial;">Después de investigar un poco y de irme introduciendo al lenguaje de programación Python, encontré una librería con la que este proceso se puede hacer mucho más rápido, en el que si quieres cambiar el rango de fechas o incluir nuevos activos, no tenemos que volver a iniciar desde cero y repetir todo el ciclo - <b><i><span style="color: #cc0000;">pandas_datareader</span></i></b>.</span></p><p style="text-align: justify;"><span style="font-family: arial;">La página con la documentación <a href="https://pandas-datareader.readthedocs.io/en/latest/" target="_blank">es esta</a>:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieGiVperMKdT8IKbIrMDCQlz5EabDwoiuC1bNhejeUToS0alpzqZVpAxTMxpUzbcWEc5KQSbe38uhDdQbyqjt9DdntIXeNNWX8PfK8Xg_ZIX1mNHzRHhwjwIMDoBBqOBK8-9RyE9fAUqmt0vhDurL9ARBwUsslM7MTnfOmOKuWBjn2F-ZVCc4RUCzoeQ/s2732/D72DD6FC-8449-471F-89A7-B51AA9B78E36.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieGiVperMKdT8IKbIrMDCQlz5EabDwoiuC1bNhejeUToS0alpzqZVpAxTMxpUzbcWEc5KQSbe38uhDdQbyqjt9DdntIXeNNWX8PfK8Xg_ZIX1mNHzRHhwjwIMDoBBqOBK8-9RyE9fAUqmt0vhDurL9ARBwUsslM7MTnfOmOKuWBjn2F-ZVCc4RUCzoeQ/w640-h480/D72DD6FC-8449-471F-89A7-B51AA9B78E36.png" width="640" /></a></div><br /><span style="font-family: arial;">En la opción <b><i><span style="color: #cc0000;">Data Readers</span></i></b>, podemos encontrar la documentación para las diferentes fuentes a las que soporta la conexión y extracción de datos el paquete, incluyendo <b><i><span style="color: #cc0000;">Yahoo Finance</span></i></b>:</span><p></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNTNI1m3OT8mr0r58df1igOy_sOTKZ8GOjso6T12yimcy-F9fgvtDmQAHeKFevCtGAYs--HTen42FsOGjzAaHZLTKabcH-CikPnl8f3s7HcBrj1yNtWj2ePImwLZy7dSMLeA1Or_dDabnD7ze_QXUrxnjKRzFLDbjvY28YtbN8oG5ycHTDUcLjG-7Vpw/s2732/1AD60931-906E-4C32-9AED-5C75ECAFA8E2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNTNI1m3OT8mr0r58df1igOy_sOTKZ8GOjso6T12yimcy-F9fgvtDmQAHeKFevCtGAYs--HTen42FsOGjzAaHZLTKabcH-CikPnl8f3s7HcBrj1yNtWj2ePImwLZy7dSMLeA1Or_dDabnD7ze_QXUrxnjKRzFLDbjvY28YtbN8oG5ycHTDUcLjG-7Vpw/w640-h480/1AD60931-906E-4C32-9AED-5C75ECAFA8E2.png" width="640" /></a></div><br /><span style="font-family: arial;"><br /></span><div><span style="font-family: arial;">Ahora, vamos a entrar en materia en nuestro código en <i><b><span style="color: #cc0000;">Python</span></b></i>, para ejecutar el proceso y liberarnos de la tediosa operatividad del paso a paso en excel.</span><div><span><a name='more'></a></span></div><div><span style="font-family: arial;">En la plataforma<b><i><span style="color: #cc0000;"> Colab de Google</span></i></b>, vamos a escribir el siguiente código:</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;"><script src="https://gist.github.com/edualzate/16760fd839e313bbfa3e68faa437e87c.js"></script><br /></span><p></p><p style="text-align: justify;"><span style="font-family: arial;">Entonces, en las líneas 1 y 7 del código, vamos a instalar e importar las librerías que necesitamos para poder extraer la información de <i><b><span style="color: #cc0000;">Yahoo Finance</span></b></i>.</span></p><p style="text-align: justify;"><span style="font-family: arial;">La línea 10 crea una lista con el código de los activos, en esta lista, podemos agregar más activos, cambiar los que tenemos por otros etc.</span></p><p style="text-align: justify;"><span style="font-family: arial;">En las líneas 12 y 13, creamos el rango de tiempo para el que queremos descargar los precios de los activos.</span></p><p style="text-align: justify;"><span style="font-family: arial;">Entre las líneas 18 y 24, realizamos la conexión y extracción de los datos y los devolvemos en un dataframe de pandas. En esta extracción, estamos pidiéndole que nos descargue los precios de cierre ajustados ([Adj Close]).</span></p><p style="text-align: justify;"><span style="font-family: arial;">Por último entre las líneas 27 a 35, vamos a crear un gráfico de lineas utilizando <b><i><span style="color: #cc0000;">Matplotlib</span></i></b>, para graficar los precios de los activos. Al ejecutar el script, este es el resultado:</span></p></div></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfZRHFg40sF1htpLwmO45BcczuL1RM-ipJc1fAFuCH3NOEkB-KmINAN0NBYdLfn5iq4JFx4iP4wOELoGlF0SgGHv2YLNPrcb9Sh8Za4HLyftbl-WNZQ5yRGbBqo6pgnDWPrWD4UkTU0Yq_JbeS-ex1VF7EpJrw7Ff3Fz0evIWL4wTZvtL6pRlOjGORGA/s2732/4468DBE8-6210-464D-B4D5-2E14EC358B4E.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfZRHFg40sF1htpLwmO45BcczuL1RM-ipJc1fAFuCH3NOEkB-KmINAN0NBYdLfn5iq4JFx4iP4wOELoGlF0SgGHv2YLNPrcb9Sh8Za4HLyftbl-WNZQ5yRGbBqo6pgnDWPrWD4UkTU0Yq_JbeS-ex1VF7EpJrw7Ff3Fz0evIWL4wTZvtL6pRlOjGORGA/w640-h480/4468DBE8-6210-464D-B4D5-2E14EC358B4E.png" width="640" /></a></div><div><br /></div><div style="text-align: justify;"><span style="font-family: arial;">Con esto, tenemos un script que nos permite automatizar la extracción de los precios en <b><i><span style="color: #cc0000;">Yahoo Finance</span></i></b>. </span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">En un próximo post, vamos a revisar como calcular los retornos de los precios.</span></div>Unknownnoreply@blogger.com1Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-34697346628917741832022-06-05T16:17:00.004-05:002022-06-05T16:17:35.534-05:00Matemática Financiera: Maximizar el VPN de un Portafolio de Inversión. Problema 5.23 - Evaluación Económica de Inversiones. Rodrigo Varela<div style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy, por solicitud de un lector del blog, vamos a desarrollar el ejercicio 5.23, del libro: <b><i><span style="color: #cc0000;">Evaluación económica de inversiones, de Rodrigo Varela.</span></i></b></span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">5.23 La empresa “Rentabimaxi” ha venido trabajando con una tasa mínima del 35% por año y tienen que decidir cómo asignar los $3.500.000 de que dispone entre los 5 proyectos que a continuación se describen:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXm_b0S_Mkl0fIjmiTd1sijda7F3seVwVJTMi7GTpevqkUf9q6-ROMa-02WpVRfjRnUAKEb5CoBfMy6CkADHdc3NRtlNMAifaYJKTLL5udvnxWol-go2ZLFei_bRFbZQbbUx7ERhLnSllFIUWWVV9rP6umcxCWV98RoKYZgyYvdtG9ujW7qI0W_mnbOw/s2732/46E44D24-3FC0-4883-A91A-6727FCD48A71.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXm_b0S_Mkl0fIjmiTd1sijda7F3seVwVJTMi7GTpevqkUf9q6-ROMa-02WpVRfjRnUAKEb5CoBfMy6CkADHdc3NRtlNMAifaYJKTLL5udvnxWol-go2ZLFei_bRFbZQbbUx7ERhLnSllFIUWWVV9rP6umcxCWV98RoKYZgyYvdtG9ujW7qI0W_mnbOw/w640-h480/46E44D24-3FC0-4883-A91A-6727FCD48A71.png" width="640" /></a></div><br /><span style="font-family: arial;">(Entre las filas 3 a la 10, tenemos los 5 proyectos, con las diferentes variables que los caracterizan. En la fila 10, tenemos las restricciones para las diferentes variables).</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Se sabe que el proyecto 3 sólo se puede hacer si se realiza el 5; que el 1 y el 4 son mutuamente excluyentes; que los proyectos 2 y 4 son complementarios con un efecto sinérgico positivo sobre el 4 del 5% en ingresos netos. Los proyectos 1 y 5 son complementarios, con un efecto sinérgico de reducción de inversión del 2% sobre cada proyecto.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">¿Cuál sería la decisión que le recomendaría a “Rentabimaxi”?</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Para resolver el ejercicio, vamos a construir un modelo financiero en </span><b style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d; font-family: arial; font-size: 13.199999809265137px;"><i><span style="color: #3d85c6;">G</span><span style="color: #cc0000;">o</span><span style="color: #f1c232;">o</span><span style="color: #3d85c6;">g</span><span style="color: #cc0000;">l</span><span style="color: #6aa84f;">e</span><span style="color: #cc0000;"> Sheets</span></i></b><span style="font-family: arial;"> con la siguiente formulación: </span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYoIa2omW-Si1Y7zbKR6dtC663_Am1T2NAgBi0kVJEcZEDoj2UGVmSKGG0V58PHcX1i6MWrEeq7XxDfRcPVHabtYgp2s0mrggYpmYU92cZUE18FZP9ZFfIEO-z0sXMcdz7tCes0QyCQdKiBEjOSC5UM_n7WE4JaN49FM8KhnZ8eFfFyiO_iAn0AzKFDg/s2732/16B34C32-6D79-433C-94A9-D7C53EBD9218.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYoIa2omW-Si1Y7zbKR6dtC663_Am1T2NAgBi0kVJEcZEDoj2UGVmSKGG0V58PHcX1i6MWrEeq7XxDfRcPVHabtYgp2s0mrggYpmYU92cZUE18FZP9ZFfIEO-z0sXMcdz7tCes0QyCQdKiBEjOSC5UM_n7WE4JaN49FM8KhnZ8eFfFyiO_iAn0AzKFDg/w640-h480/16B34C32-6D79-433C-94A9-D7C53EBD9218.png" width="640" /></a></div><br /><span style="font-family: arial;">Como podemos ver, en el modelo he incluido en el rango C12:C17, la formulación que resuelve las restricción que nos exige que el proyecto 3 solo se realiza si se ejecuta el 5 y que el 1 y el 4 son mutuamente excluyentes. El rango D12:D17, recoge el efecto sinérgico positivo en los ingresos del proyecto 4 y por último, el rango E12:E17, recoge el efecto de la reducción de la inversión para los proyectos 1 y 5 cuando se realizan al tiempo.</span></div><div style="text-align: justify;"><span><a name='more'></a></span></div><div style="text-align: justify;"><span style="font-family: arial;">Ahora,vamos a evaluar los proyectos con nuestro modelo, para esto, vamos a ingresar el número 1, en el rango B12:B17, con lo que vamos a asumir que todos los proyectos se van a realizar, y vamos a observar que pasa en la columna Ejecutar:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVUD7EaOnNCRANWoy_AATEWeu8pR2AYgpBMaAus_dpwdyIAm2bt0NQAS5AaVJgGkLt-e8sUDtKwhJ4zZF6Vy8xK4D1dH48ud06TrO_FUsbrzKyhwBiFrE8tou2n8k2NgYXr1thRaCl8Hvz0b-7csn4uVmNRPzG-fHMJdsLZ38t_hz7nINZE61aiNBo7w/s2732/A01D69F1-633D-4B4D-8FDC-B2D360898E46.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVUD7EaOnNCRANWoy_AATEWeu8pR2AYgpBMaAus_dpwdyIAm2bt0NQAS5AaVJgGkLt-e8sUDtKwhJ4zZF6Vy8xK4D1dH48ud06TrO_FUsbrzKyhwBiFrE8tou2n8k2NgYXr1thRaCl8Hvz0b-7csn4uVmNRPzG-fHMJdsLZ38t_hz7nINZE61aiNBo7w/w640-h480/A01D69F1-633D-4B4D-8FDC-B2D360898E46.png" width="640" /></a></div><br /></div><div style="text-align: justify;"><span style="font-family: arial;"><div class="separator" style="clear: both; text-align: center;"></div> Como podemos ver, por las restricciones que trae el ejercicio, podemos ejecutar los proyectos 2, 3, 4 y 5, pero si lo hacemos, llegamos a un <b><i><span style="color: #cc0000;">VPN</span></i></b> de -$46,91.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Realizar los proyectos 1 y 5, para buscar la sinergia en la inversión, también nos lleva a un <b><i><span style="color: #cc0000;">VPN </span></i></b>negativo de -$42,87. Aclarado esto, vamos a descartar también el proyecto 5 (ingresando un cero en la celda B17):</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRl1fVD_cEb5-svMYLoKvozCkajFp1DUW8V10GAuzAB3ftZ_ss_ks_rgmYK6avX2zrkAdLGj6qD17xJ_IqV0m9sPACX79LfNEwLaHTLPiZU89zRjaUaWNGo0BmM-_4x2l_6g_0YLsicyyYxukOdvYGdMFH6WBXGQxKmRB-2dHQzao08dxBgF-KdLko-w/s2732/01092F0F-49D6-4B94-BE4D-998EEA98A705.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRl1fVD_cEb5-svMYLoKvozCkajFp1DUW8V10GAuzAB3ftZ_ss_ks_rgmYK6avX2zrkAdLGj6qD17xJ_IqV0m9sPACX79LfNEwLaHTLPiZU89zRjaUaWNGo0BmM-_4x2l_6g_0YLsicyyYxukOdvYGdMFH6WBXGQxKmRB-2dHQzao08dxBgF-KdLko-w/w640-h480/01092F0F-49D6-4B94-BE4D-998EEA98A705.png" width="640" /></a></div><br /><span style="font-family: arial;">Y al hacerlo, llegamos a que nos quedan para ejecutar los proyectos 2 y 4, que nos producen un VPN positivo de $12,81. Esta es la opción de inversión que maximiza la rentabilidad de “Rentabimaxi”. Otra forma de resolverlo es utilizando solver y maximizar el VPN.</span></div>Unknownnoreply@blogger.com2Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-20903802980486090842022-04-15T19:43:00.005-05:002022-04-15T19:43:51.175-05:00Financial Modeling - Ejercicio 8 Capítulo1 , Préstamo de vehículo usando Google Sheets y Python - Simon Benninga<div style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy estamos de regreso para continuar con el desarrollo de los ejercicios del libro: <b><i><span style="color: #cc0000;">Financial Modeling - Simon Benninga. </span></i></b>En esta oportunidad, vamos a resolver el ejercicio 8 que dice asi:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">8. You have just taken a car loan of $15,000. The loan is for 48 months at an annual interest rate of 15% (which the bank translates to a monthly rate of 15%/12 = 1.25%). The 48 payments (to be made at the end of each of the next 48 months) are all equal.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">a. Calculate the monthly payment on the loan.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">b. In a loan table calculate, for each month: the principal remaining on the loan at the beginning of the month and the split of that month’s payment between interest and repayment of principal.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">c. Show that the principal at the beginning of each month is the present value of the remaining loan payments at the loan interest rate (use either NPV or the PV functions).</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="color: #6aa84f; font-family: arial;"><b><i>Traducción:</i></b></span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">8. Usted toma un préstamo de vehículo por $15,000. El préstamo es por 48 meses a una tasa anual del 15% (que el banco convierte a una tasa mensual así: 15% / 12 = 1.25%). Los 48 pagos (que se realizan al final de cada mes) son todos iguales.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">a. Calcule el valor de la cuota mensual.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">b. En una tabla de amortización de préstamos, para cada mes, calcule: El saldo a capital al inicio de cada mes y la porción de abono a intereses y capital de cada una de las 48 cuotas.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">c. Demuestre que el capital al inicio de cada mes es el valor presente de los pagos pendientes (use las funciones de VPN o VP para calcular).</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Para resolver el problema, vamos a construir el siguiente modelo financiero en <b style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); color: #5d5d5d;"><i><span style="color: #3d85c6;">G</span><span style="color: #cc0000;">o</span><span style="color: #f1c232;">o</span><span style="color: #3d85c6;">g</span><span style="color: #cc0000;">l</span><span style="color: #6aa84f;">e</span><span style="color: #cc0000;"> Sheets</span></i></b>:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHj6irgb0k42NPV_CDaxpzv31uujQzeRgZof1jYZnLntvRFdzoWPq1Crmerr6LmPL63K8HLM2Iid-DHIOV0i6F2dr8YkKMncmmleBClvEpEykDtm9-UcJmy1gZDY8yfq57_nbSzZ9ueILckb1rJAh1z8K9467fW4TuddSu3lQWJsSPyNZFEA8TIq5lyg/s2732/1.8.1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHj6irgb0k42NPV_CDaxpzv31uujQzeRgZof1jYZnLntvRFdzoWPq1Crmerr6LmPL63K8HLM2Iid-DHIOV0i6F2dr8YkKMncmmleBClvEpEykDtm9-UcJmy1gZDY8yfq57_nbSzZ9ueILckb1rJAh1z8K9467fW4TuddSu3lQWJsSPyNZFEA8TIq5lyg/w640-h480/1.8.1.png" width="640" /></a></div><br /><span style="font-family: arial;">Con este modelo, podemos responder el literal a y b. El valor de la cuota mensual es de $417.46. Y en la columna C y D, tenemos la proporción que en cada cuota corresponde a capital e intereses.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Ahora vamos a responder el literal c:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRRJHjz-_BxrnRwOVOm12hOV-46656NcY8HU45Xg4OulDzIW8K7L0GzDvfoIi7tFoWsYlQ488jYz6UuPNclFuGZBwLW1qVsiIiaRC-GXd6TlV4p006qD6FGfhlM6E9xAaSyV-4xhS8RC-t7T7VK36fawrb5XBoKjr1drPAK8oeRni6f7TCO7piLf_I4g/s2732/1.8.2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRRJHjz-_BxrnRwOVOm12hOV-46656NcY8HU45Xg4OulDzIW8K7L0GzDvfoIi7tFoWsYlQ488jYz6UuPNclFuGZBwLW1qVsiIiaRC-GXd6TlV4p006qD6FGfhlM6E9xAaSyV-4xhS8RC-t7T7VK36fawrb5XBoKjr1drPAK8oeRni6f7TCO7piLf_I4g/w640-h480/1.8.2.png" width="640" /></a></div><br /><span style="font-family: arial;">Lo que hicimos fue calcular en cada periodo, el valor presente de las cuotas restantes, descontándolo con la tasa del 1.25%. Si este cálculo es igual al Saldo (columna E) hemos resuelto el problema.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Veamos la formulación del modelo:</span></div><div style="text-align: justify;"><span><a name='more'></a></span><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTktM0Zi3TeZ2t7w_0bZnEhM9c8fthRBVtwEg_fo8abTwnsXNTSOgKTBNWKzEMiy1xkJufeP7UkSWvHBMJbMKOFG91cxzPs5S88KtrecdXDlFaDQIFTIAJ7LRMPCcMrYc-E0sTkSwe8xWTcRJ8soHYFHqxt8EzPrJzmUlfbWLNe8608iFQg9uZ33nZ9A/s2732/1.8.3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTktM0Zi3TeZ2t7w_0bZnEhM9c8fthRBVtwEg_fo8abTwnsXNTSOgKTBNWKzEMiy1xkJufeP7UkSWvHBMJbMKOFG91cxzPs5S88KtrecdXDlFaDQIFTIAJ7LRMPCcMrYc-E0sTkSwe8xWTcRJ8soHYFHqxt8EzPrJzmUlfbWLNe8608iFQg9uZ33nZ9A/w640-h480/1.8.3.png" width="640" /></a></div><br /> En <b><i><span style="color: #cc0000;">python</span></i></b>, podemos resolver el problema utilizando el siguiente script:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7clxbVSSzfXG_NajA4hN49n4SE9zzA3FRtCgV68QjZbpZGfIrzlmFPL3MIorkwtOB7qe5xU091E2nFpRjxyBg1RZbSKTVNGNkJbSpdJaNbzX1V1FFXdM8xoJoMEqzvUL36NYIn3OHsl6_5vxvCR_eDGUQw1_hHS1zYoS2b10L2MjUOLzyNuW6LhoRNQ/s2732/1.8.4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7clxbVSSzfXG_NajA4hN49n4SE9zzA3FRtCgV68QjZbpZGfIrzlmFPL3MIorkwtOB7qe5xU091E2nFpRjxyBg1RZbSKTVNGNkJbSpdJaNbzX1V1FFXdM8xoJoMEqzvUL36NYIn3OHsl6_5vxvCR_eDGUQw1_hHS1zYoS2b10L2MjUOLzyNuW6LhoRNQ/w640-h480/1.8.4.png" width="640" /></a></div><br /></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglRT8DM-6NoRYUEZb6XTataQUfF_zWNsCtyApznsBjVARC9AZvMPkNMFfeNIMst0v8I4gD49ZZ9Zc2KOawcx8fBtWggWiU9QMrkVwNR2WcsKADyR15AC99jU00tXx-XQlkCYim_GMkV1p5IQEi8PjzX22aCK9LmOoP7OzrzRXxE5sHVwf26kmA-M8ATA/s2732/1.8.5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglRT8DM-6NoRYUEZb6XTataQUfF_zWNsCtyApznsBjVARC9AZvMPkNMFfeNIMst0v8I4gD49ZZ9Zc2KOawcx8fBtWggWiU9QMrkVwNR2WcsKADyR15AC99jU00tXx-XQlkCYim_GMkV1p5IQEi8PjzX22aCK9LmOoP7OzrzRXxE5sHVwf26kmA-M8ATA/w640-h480/1.8.5.png" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyvVTrV_RjJyY0mnNga5w_V_05_Odf4H6MwPTwQOJgjPKt3AC6Y-VgPFMPGR4AqkVMXwmDOpN70Mc1hfuxej2l9B5sWtbwg8-kp70QtO08Yc7j95Mh06fGXeKPb94i172G3CQ5-u1rfPFU7LgRxiHVxck_sOvZYhuRhrlIY6vpEk1GA9X-3yy0-SXEkg/s2732/1.8.6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyvVTrV_RjJyY0mnNga5w_V_05_Odf4H6MwPTwQOJgjPKt3AC6Y-VgPFMPGR4AqkVMXwmDOpN70Mc1hfuxej2l9B5sWtbwg8-kp70QtO08Yc7j95Mh06fGXeKPb94i172G3CQ5-u1rfPFU7LgRxiHVxck_sOvZYhuRhrlIY6vpEk1GA9X-3yy0-SXEkg/w640-h480/1.8.6.png" width="640" /></a></div><br /><span style="font-family: arial;">A continuación el código fuente:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;"><script src="https://gist.github.com/edualzate/a4fa8b782249e6816d208d829f479f04.js"></script></span></div>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-92119235898262570202022-03-29T19:28:00.010-05:002022-04-04T13:58:28.395-05:00Financial Modeling - Ejercicio 7 Capítulo1 , Calculando la Anualidad para cubrir un Préstamo usando Google Sheets y Python - Simon Benninga<p style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy vamos a continuar resolviendo los problemas del libro: <b><i><span style="color: #cc0000;">Financial Modeling - Simon Benninga</span></i></b>. En esta oportunidad, vamos a resolver el ejercicio 7 del capítulo 1.</span></p><p style="text-align: justify;"><span style="font-family: arial;">7. Calculate the flat annual payment required to pay off a 13%, 5-year loan of $100,000.</span></p><p style="text-align: justify;"><span style="color: #6aa84f; font-family: arial;"><b>Traducción:</b></span></p><p style="text-align: justify;"><span style="font-family: arial;">7. Calcule el pago anual para cancelar un préstamo de $100,000, que tiene un plazo de 5 años y una tasa efectiva anual del 13%.</span></p><p style="text-align: justify;"><span style="font-family: arial;">Primero, vamos a construir el <b><i><span style="color: #cc0000;">diagrama de flujos</span></i></b> para tener un mejor entendimiento del problema:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5Hs15dL1e2YCES3ef9wgAt2pOo7ewK0Tua2lL5LryIARCdtW9ZP1XyRC1DJTWok46KNbSn9NB5a99mJXPUHyPJe60KYzg1c8vQ4KfbXk3kDNYT1KqPT7k-6O3n3Be1ns9W0m7NZ57Eh_TbqgUe-X8RnRytD4q9fTtDxRyvnlD1E32m2DpUzagqZh19Q/s2732/18F4FC1D-1D73-4321-AD9D-2538D644D022.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5Hs15dL1e2YCES3ef9wgAt2pOo7ewK0Tua2lL5LryIARCdtW9ZP1XyRC1DJTWok46KNbSn9NB5a99mJXPUHyPJe60KYzg1c8vQ4KfbXk3kDNYT1KqPT7k-6O3n3Be1ns9W0m7NZ57Eh_TbqgUe-X8RnRytD4q9fTtDxRyvnlD1E32m2DpUzagqZh19Q/w640-h480/18F4FC1D-1D73-4321-AD9D-2538D644D022.png" width="640" /></a></div><br /><div style="text-align: justify;"><span style="font-family: arial;">Entonces, lo que tenemos que encontrar es el valor de las cinco anualidades uniformes que al traerlas a valor presente y descontarlas con una tasa del 13% equivale a $100,000. </span></div><p></p><p style="text-align: justify;"><span style="font-family: arial;">En el siguiente vídeo, vamos a ver como encontrar dicha anualidad, utilizando </span><b style="-webkit-text-size-adjust: auto; caret-color: rgb(93, 93, 93); font-family: arial;"><i><span style="color: #3d85c6;">G</span><span style="color: #cc0000;">o</span><span style="color: #f1c232;">o</span><span style="color: #3d85c6;">g</span><span style="color: #cc0000;">l</span><span style="color: #6aa84f;">e</span><span style="color: #cc0000;"> Sheets</span></i></b><span style="font-family: arial;"> y también utilizando <b><i><span style="color: #cc0000;">Python en la plataforma Colab</span></i></b>:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="541" src="https://www.youtube.com/embed/VjbTHwAe3BI" width="653" youtube-src-id="VjbTHwAe3BI"></iframe></div><br /><span style="font-family: arial;">A continuación el código fuente:</span><p></p><div><span style="font-family: arial;"><script src="https://gist.github.com/edualzate/237dca736c066eb61c2a20cbd56c6203.js"></script></span></div>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-59392121625218774752022-03-26T19:08:00.009-05:002022-03-27T14:07:09.607-05:00Financial Modeling - Ejercicio 6 Capítulo1 , Cálculando la TIR Utilizando Solver y Google Sheets - Simon Benninga<div style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy vamos a resolver el problema 6 del capítulo 1 del libro: <b><i><span style="color: #cc0000;">Financial Modeling de Simon Benninga.</span></i></b></span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">En esta oportunidad, el modelo financiero lo vamos a resolver utilizando <b><i><span style="color: #3d85c6;">G</span><span style="color: #cc0000;">o</span><span style="color: #f1c232;">o</span><span style="color: #3d85c6;">g</span><span style="color: #cc0000;">l</span><span style="color: #6aa84f;">e</span><span style="color: #cc0000;"> Sheets</span></i></b>.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">6. An alternative definition of the IRR is the rate which makes the principal at the beginning of year 6 equal to zero.9 This is shown in the printout above, in which cell E9 gives the principal at the beginning of year 6. Using the Goal Seek function of Excel, find this rate (below we illustrate how the screen should look).</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCW-xoyRggnPya8FxO8akM-vISTeMnifcYICP9XfRRmgg5xA3UihQ68_yHST_wbG7XMyBPShfuYqpKJaXQxVCybWQ4EVq3s0vK8LQGS8p7AnHA7zHIu64LpwqxjfsSKrGVhULVv6-Wt_xoxzkX06bIz7N4X6naTqN8_CnVbjHYsDVUNNOjZw22vbk1vg/s1863/1.6.0.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="918" data-original-width="1863" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCW-xoyRggnPya8FxO8akM-vISTeMnifcYICP9XfRRmgg5xA3UihQ68_yHST_wbG7XMyBPShfuYqpKJaXQxVCybWQ4EVq3s0vK8LQGS8p7AnHA7zHIu64LpwqxjfsSKrGVhULVv6-Wt_xoxzkX06bIz7N4X6naTqN8_CnVbjHYsDVUNNOjZw22vbk1vg/w640-h316/1.6.0.png" width="640" /></a></div><span style="font-family: arial;">Tabla 1.</span></div><div style="text-align: justify;"><br /><span style="color: #6aa84f; font-family: arial;"><b><i>Traducción:</i></b></span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">6. Una definición alterna para la TIR sería: la tasa que hace que el capital al inicio del año 6 sea igual a cero. Esto lo pudimos <a href="https://eduardoalzate.blogspot.com/2022/03/financial-modeling-ejercicio-5.html" target="_blank">observar en el ejercicio 5</a>. Usando la función buscar objetivo de Excel, encuentre la TIR.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Como lo mencionamos al inicio del post, en esta oportunidad vamos a trabajar con <b><i><span style="color: #3d85c6;">G</span><span style="color: #cc0000;">o</span><span style="color: #f1c232;">o</span><span style="color: #3d85c6;">g</span><span style="color: #cc0000;">l</span><span style="color: #6aa84f;">e</span></i></b><b><i><span style="color: #674ea7;"> </span><span style="color: #cc0000;">Sheets</span><span style="color: #674ea7;">:</span></i></b></span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic70JGBVPZvcVm7_p6ozfbePb-t5VdkPFIU3EJ9MSqtHJFJFCQf7BHDapwXL5QQc42wifjPGug9_9Bfpp8UAZ5JQtLSJwJtj16tq3zAj6R9DcV6Dq7P-9DK0wFJiXS-zKwQLHmmdbYwXJFWQMl5KUVuIGmkO_dT9W_FLpiqeA5dFjae6Hq9XUIbzLA-A/s2732/1.6.1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic70JGBVPZvcVm7_p6ozfbePb-t5VdkPFIU3EJ9MSqtHJFJFCQf7BHDapwXL5QQc42wifjPGug9_9Bfpp8UAZ5JQtLSJwJtj16tq3zAj6R9DcV6Dq7P-9DK0wFJiXS-zKwQLHmmdbYwXJFWQMl5KUVuIGmkO_dT9W_FLpiqeA5dFjae6Hq9XUIbzLA-A/w640-h480/1.6.1.png" width="640" /></a></div><br /><span style="font-family: arial;">En el menú Extensions vamos a seleccionar la opción <b><i><span style="color: #f1c232;">Solver</span></i></b>:</span></div><div style="text-align: justify;"><span><a name='more'></a></span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD_sKhLCQHnJM_r1Lw7lfQm678fxSHkX5CtAjVsrpCD2-mqASqOSiuHIF20pY_xP4r20Qn9XYEkerM6gdGD3cCeVBKUfFGzA2k66GtZR1jhqv9QdCY4tNqYXd0W5K0CqbMd11T1Y1i_vOalZQLP_1_LnaPDoggsU07M6vl4I-Yu9vb1ztLsPheFaZHbw/s2732/1.6.2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD_sKhLCQHnJM_r1Lw7lfQm678fxSHkX5CtAjVsrpCD2-mqASqOSiuHIF20pY_xP4r20Qn9XYEkerM6gdGD3cCeVBKUfFGzA2k66GtZR1jhqv9QdCY4tNqYXd0W5K0CqbMd11T1Y1i_vOalZQLP_1_LnaPDoggsU07M6vl4I-Yu9vb1ztLsPheFaZHbw/w640-h480/1.6.2.png" width="640" /></a></div><br /><span style="font-family: arial;">Al hacerlo se nos va a desplegar el cuadro de diálogo de la aplicación. <b><i><span style="color: #cc0000;">Para generar un buscar objetivo, debemos hacer lo siguiente:</span></i></b></span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSnY3vtoO3W3R59H250UcwsZv1Wv9VuZdoxKJ4uU6EAFpbNkQVyjSN1iId-yTwOMaAvitbylR2v_arNr9ZlYAVNeqPbpSr-eJ_fAjGB6q4ew37zNXdI3QpdFcXd5UbDC2J5seQCKfHPMBp6RYjVJ8b2uxHIbn7CUWQXsQoB8W4y1MnhDfzt5PNcnVrqg/s2732/1.6.4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSnY3vtoO3W3R59H250UcwsZv1Wv9VuZdoxKJ4uU6EAFpbNkQVyjSN1iId-yTwOMaAvitbylR2v_arNr9ZlYAVNeqPbpSr-eJ_fAjGB6q4ew37zNXdI3QpdFcXd5UbDC2J5seQCKfHPMBp6RYjVJ8b2uxHIbn7CUWQXsQoB8W4y1MnhDfzt5PNcnVrqg/w640-h480/1.6.4.png" width="640" /></a></div><br /><span style="color: #e69138; font-family: arial;"><b><i>En la campo Set Obtective, debemos ingresar la celda que queremos hacer igual a cero, que en nuestro modelo es E9. Después seleccionamos la opción Value Of y allí ingresamos cero. Y en el campo BY Changing, ingresamos la celda que contiene la tasa que vamos a variar para llegar a cero, es decir B1. Por último damos clic en el botón Solve y tenemos:</i></b></span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLxbigDPWk7QqPrLXMJwit4yILIPCW0fmYoCFuBcjXCr_PHWxUa8uhFSAtoxnV-9By7nRBb_mZHjIoFvGREq1zbGyn446UT8bL3DqvGmMJ-hzJNqD8IEF2u93OvsyaQmQazw6cOSHZDM7N995S2fkW398Kf8_OpI-TvjPZJEZF8NwpSeCgBHQ5NL1O6w/s2732/1.6.5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLxbigDPWk7QqPrLXMJwit4yILIPCW0fmYoCFuBcjXCr_PHWxUa8uhFSAtoxnV-9By7nRBb_mZHjIoFvGREq1zbGyn446UT8bL3DqvGmMJ-hzJNqD8IEF2u93OvsyaQmQazw6cOSHZDM7N995S2fkW398Kf8_OpI-TvjPZJEZF8NwpSeCgBHQ5NL1O6w/w640-h480/1.6.5.png" width="640" /></a></div><br /><span style="font-family: arial;">Como podemos ver, el resultado de solver es que la tasa 5.068% es la que hace que nuestro valor de capital al inicio del año 6 sea igual a cero. Con esto, hemos encontrado la <b><i>TIR</i></b> del ejercicio.</span></div>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-44800652865600780342022-03-26T11:01:00.002-05:002022-03-26T11:01:25.893-05:00Financial Modeling - Ejercicio 5 Capítulo1 , Cálculando la TIR de una Inversión - Simon Benninga<p style="text-align: justify;"><span style="font-family: arial;">Continuando con los problemas del libro: <b><i><span style="color: #cc0000;">Financial Modeling - Simon Benninga</span></i></b>, vamos a trabajar el día de hoy el ejercicio 5 del capítulo 1.</span></p><p style="text-align: justify;"><span style="font-family: arial;">5. I</span><span style="text-align: left;"><span style="font-family: arial;">n this exercise we solve iteratively for the internal rate of return. Consider an investment which costs 800 and has cash flows of 300, 200, 150, 122, 133 in years 1–5. Setting up the loan table below shows that 10% is greater than the IRR (since the return of principal at the end of year 5 is less than the principal at the beginning of the year):</span></span></p><p style="text-align: justify;"><span style="text-align: left;"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOhMJDZlMB0bly2BuiABP0bnm6s_aCzHFrv9bQRz2Dr6ptALzqO9RjyGyHwvGsTlaXqGWhZGTLJPDdHE4aC3qs_nMYphKfOsSo8fZkVXKJ9DUkjqzRmgpmbp55U2t57bta2xNKoB9-LHHjupQChAkJbqw9F3DHs75OVSK1Bao-_h512m1OK1AOFzBlZA/s1849/11833754-0E1B-4E13-8FEB-E6772DD009CF.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="842" data-original-width="1849" height="292" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOhMJDZlMB0bly2BuiABP0bnm6s_aCzHFrv9bQRz2Dr6ptALzqO9RjyGyHwvGsTlaXqGWhZGTLJPDdHE4aC3qs_nMYphKfOsSo8fZkVXKJ9DUkjqzRmgpmbp55U2t57bta2xNKoB9-LHHjupQChAkJbqw9F3DHs75OVSK1Bao-_h512m1OK1AOFzBlZA/w640-h292/11833754-0E1B-4E13-8FEB-E6772DD009CF.jpeg" width="640" /></a></div><p></p><p style="text-align: justify;"><span style="font-family: arial;">Tabla 1.</span></p><p style="text-align: justify;"><span style="font-family: arial;">Setting the IRR? cell equal to 3% shows that 3% is less than the IRR, since the return of principal at the end of year 5 is greater than the principal at the beginning of year 5.</span></p><p style="text-align: justify;"><span style="font-family: arial;">By changing the IRR? cell, find the internal rate of return of the investment.</span></p><p style="text-align: justify;"><span style="text-align: left;"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv2ogvIMfd9H_kteHK_rgWkRLzf-N9TRoJFSldcQMwtVDMTQXAGMXh89OZvJ3e93yxuQB-jMBZV2_70YcCcFdINL80KDZho38XFyg4UhS0j0wapHfg19tkFlHOOJ4ARBuEoaDm4RE_F3j8q7JpmVDly7CdL-1p8fFTf9ZThtnq-L-3r3mlzttirpmUkg/s1871/1.5.2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="770" data-original-width="1871" height="264" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv2ogvIMfd9H_kteHK_rgWkRLzf-N9TRoJFSldcQMwtVDMTQXAGMXh89OZvJ3e93yxuQB-jMBZV2_70YcCcFdINL80KDZho38XFyg4UhS0j0wapHfg19tkFlHOOJ4ARBuEoaDm4RE_F3j8q7JpmVDly7CdL-1p8fFTf9ZThtnq-L-3r3mlzttirpmUkg/w640-h264/1.5.2.png" width="640" /></a></div><p style="text-align: justify;"><span style="text-align: left;"><span style="font-family: arial;">Tabla 2.</span></span></p><span style="color: #6aa84f; font-family: arial;"><div style="text-align: justify;"><b><i>Traducción:</i></b></div></span><p></p><p style="text-align: justify;"><span style="font-family: arial;">En este ejercicio vamos a resolver de manera iterativa para calcular la TIR. Considere una inversión con una inversión inicial de $800 y flujos de caja de $300, $200, $150, $122, $133 en los próximos 5 años. En el modelo financiero de la Tabla 1, podemos ver los flujos y que al trabajar con una tasa estimada de descuento para el proyecto del 10% (celda B1), dicho valor es mayor que la TIR real (Si fuera igual a la TIR, E9 sería igual a cero). Si cambiamos B1 por 3% (ver Tabla 2), encontramos que este valor es menor que la TIR real. Cambiando el valor de B1, encuentre la TIR real del proyecto.</span></p><p style="text-align: justify;"><span style="font-family: arial;">Vamos a realizar nuestros cálculos, utilizando el siguiente <b><i><span style="color: #cc0000;">modelo financiero</span></i></b>:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo_dZs8ZnVE0IeEubW4-I4rpYD1VRKPDJb0B-xKroOw0oqxQ3gSvX586z_fBcOJX6ht_zZ74rJaijwDF2U4A2RrqbFwyqJZOqjM_bweHu8NkCZInFlAk5_h_4EnNaYWAHekq_2ERUkWlq74q470K8S-1rpgWGECgxojjvXqN5g_R369GDev7vZL-f4yw/s2732/1.5.4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo_dZs8ZnVE0IeEubW4-I4rpYD1VRKPDJb0B-xKroOw0oqxQ3gSvX586z_fBcOJX6ht_zZ74rJaijwDF2U4A2RrqbFwyqJZOqjM_bweHu8NkCZInFlAk5_h_4EnNaYWAHekq_2ERUkWlq74q470K8S-1rpgWGECgxojjvXqN5g_R369GDev7vZL-f4yw/w640-h480/1.5.4.png" width="640" /></a></div><br /><span style="font-family: arial;">Y vamos a probar con 5%:</span><p></p><span><a name='more'></a></span><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZVPUuoGnm-aT74ySMbWD_YvBuoeSsgGcPbThfoCTLip51tt2af6tqrNkPnCuxz69dCrMb3j8hEOy-e4zMWsYQHHcLpMVNUiI4ar5LxInEelbftnyCL4DVGiDQLtVr2bEeKcNVtvtE3bhjQQbEU10W-U-UvdvXvaTpFICkcyD-N66QloK_65TXQW_EYw/s2732/1.5.5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZVPUuoGnm-aT74ySMbWD_YvBuoeSsgGcPbThfoCTLip51tt2af6tqrNkPnCuxz69dCrMb3j8hEOy-e4zMWsYQHHcLpMVNUiI4ar5LxInEelbftnyCL4DVGiDQLtVr2bEeKcNVtvtE3bhjQQbEU10W-U-UvdvXvaTpFICkcyD-N66QloK_65TXQW_EYw/w640-h480/1.5.5.png" width="640" /></a></div><br /><span style="font-family: arial;">Como pueden ver, 5% es una muy buena <span style="color: #cc0000;"><i><b>aproximación a la TIR real del proyecto</b></i></span>, ya que el valor de E9 es casi igual a cero.</span><p></p><p style="text-align: justify;"><span style="font-family: arial;"> </span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: arial;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUNivK0QqnOHaQ8qQaD2zOiB-DsvtlKlWCGYbFBIhFaKIUCH9hmpZB-U2XW6-Pjfcw5NUGZ0dcmCVCXXk2IsncqfuhnE-hy_KCi-jjxkoWyA-ZSI_uGstIxeTaNnup82NdWvIROD8sLWDK8Fm09EiOVVZ7FJoIO6UQ9NC6KBPJ5eXD0UL--Sc3Fyf5bw/s2732/1.5.6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUNivK0QqnOHaQ8qQaD2zOiB-DsvtlKlWCGYbFBIhFaKIUCH9hmpZB-U2XW6-Pjfcw5NUGZ0dcmCVCXXk2IsncqfuhnE-hy_KCi-jjxkoWyA-ZSI_uGstIxeTaNnup82NdWvIROD8sLWDK8Fm09EiOVVZ7FJoIO6UQ9NC6KBPJ5eXD0UL--Sc3Fyf5bw/w640-h480/1.5.6.png" width="640" /></a></span></div><span style="font-family: arial;"><br /></span><p></p><p style="text-align: justify;"><span style="text-align: left;"><span style="font-family: arial;">Usando la funcionalidad <b><i><span style="color: #cc0000;">buscar objetivo de Excel</span></i></b>, también hubiéramos podido resolver el problema con un solo intento.</span></span></p><p style="text-align: justify;"><span style="text-align: left;"><span style="font-family: arial;">Ahora calculemos <b><i><span style="color: #cc0000;">la TIR con la función TIR( ) de excel</span></i></b>, para confirmar el resultado:</span></span></p><p style="text-align: justify;"><span style="text-align: left;"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggWzURvEDwbKBV9S57_8wz9fgpoqSzYc2yCm35jYymIRvaoiY0S5m7FWoOiZqXbNpo9hULZ7a9QfB_qVvDgh4OH5t29o23mpmT3HrHW9YgtFIIdR5eW1pbJLIMkqSGmsCbpNYxgVc615Df608mjlVO1BdwyAmzdQstz39701loEm1qzEXcCapIAWG9XQ/s2732/1.5.7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggWzURvEDwbKBV9S57_8wz9fgpoqSzYc2yCm35jYymIRvaoiY0S5m7FWoOiZqXbNpo9hULZ7a9QfB_qVvDgh4OH5t29o23mpmT3HrHW9YgtFIIdR5eW1pbJLIMkqSGmsCbpNYxgVc615Df608mjlVO1BdwyAmzdQstz39701loEm1qzEXcCapIAWG9XQ/w640-h480/1.5.7.png" width="640" /></a></div><br /><span style="font-family: arial;">A continuación, podemos ver la formulación del modelo:</span><p></p><p style="text-align: justify;"><span style="text-align: left;"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHehHdrMMq2v81KKbyqajCMx9WFzaVLDAdaDPI9zpZJuiXIBsmXrO8idP2LKsbveWavnn735LkgSC8kgHovtFDdP4acIZlQtU688dSd6EBErKxVNqSjaJPY-zi0WDZtxmTo9yu_mE8vmJv_cCFPTUAifQ6cj9me_o13QdICgGIfYA-l_DtxaffNtaD8Q/s2732/1.5.8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHehHdrMMq2v81KKbyqajCMx9WFzaVLDAdaDPI9zpZJuiXIBsmXrO8idP2LKsbveWavnn735LkgSC8kgHovtFDdP4acIZlQtU688dSd6EBErKxVNqSjaJPY-zi0WDZtxmTo9yu_mE8vmJv_cCFPTUAifQ6cj9me_o13QdICgGIfYA-l_DtxaffNtaD8Q/w640-h480/1.5.8.png" width="640" /></a></div><br /><span style="font-family: arial;">Hasta una próxima.</span><p></p>Unknownnoreply@blogger.com1Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-29118744442378970432022-03-20T10:25:00.005-05:002022-03-20T10:25:29.089-05:00Financial Modeling - Ejercicio 4 Capítulo1 , Perfil del VPN con dos TIR - Simon Benninga<p style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy vamos a seguir con los ejercicios del libro: <b><i><span style="color: #cc0000;">Financial Modeling de Simon Benninga.</span></i></b> En esta oportunidad, vamos a trabajar el ejercicio número 4 del capítulo 1.</span></p><p style="text-align: justify;"><span style="font-family: arial;">4. <span style="text-align: left;">The following cash-flow pattern has two IRRs. Use Excel to draw a graph of the NPV of these cash flows as a function of the discount rate. </span></span></p><p style="text-align: justify;"><span style="font-family: arial;"><span style="text-align: left;">Then use the IRR function to identify the two IRRs. Would you invest in this project if the opportunity cost were 20%?</span> </span></p><p style="text-align: justify;"><span style="color: #6aa84f; font-family: arial;"><b><i>Traducción:</i></b></span></p><p style="text-align: justify;"><span style="font-family: arial;">4. El siguiente flujo de caja produce dos TIR. Use excel para dibujar una gráfica del VPN de estos flujos como función de la tasa de descuento.</span></p><p style="text-align: justify;"><span style="font-family: arial;">Después use la función TIR para identificar las dos tasas. Debería usted invertir en este proyecto si el costo de oportunidad es de 20%?</span></p><p style="text-align: justify;"><span style="font-family: arial;"> </span></p><p style="text-align: justify;"><span style="font-family: arial;">En esta oportunidad, vamos a resolver el problema utilizando excel para calcular las dos TIR y <b><i><span style="color: #cc0000;">Python</span></i></b> para gráficas <b><i><span style="color: #cc0000;">el perfil del VPN</span></i></b>.</span></p><p style="text-align: justify;"><span style="font-family: arial;">Iniciemos con el cálculo en <b><i><span style="color: #cc0000;">excel</span></i></b>, mediante la construcción del siguiente <b><i><span style="color: #cc0000;">modelo financiero</span></i></b>:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1DcOFU_KBYH8MfRoo4X7ybFj-k4vcEO_yS4Gi9u_iaPhrQT1-sZAUcB42l-R7i3I9RJvBHJddBpAwNzNVI3Fno6boSKqxatuqOCthJeFoGrEIQo7t89pGln_nYfx0qYnbatMYjOMCETm12nQKbaEr_JYkS7QLGTuIQBjyzzicDv4kqo_6UyIHJNusMQ/s2732/TIR%201.4.2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1DcOFU_KBYH8MfRoo4X7ybFj-k4vcEO_yS4Gi9u_iaPhrQT1-sZAUcB42l-R7i3I9RJvBHJddBpAwNzNVI3Fno6boSKqxatuqOCthJeFoGrEIQo7t89pGln_nYfx0qYnbatMYjOMCETm12nQKbaEr_JYkS7QLGTuIQBjyzzicDv4kqo_6UyIHJNusMQ/w640-h480/TIR%201.4.2.png" width="640" /></a></div><br /><div style="text-align: justify;"><span style="font-family: arial;">Entonces las dos TIR son: 6,34% y 60,20%. Revisemos la fórmula de la <b><i><span style="color: #cc0000;">TIR</span></i></b> de la celda B12. En esta, hacemos uso del <b><i><span style="color: #cc0000;">parámetro estimar</span></i></b>. Este es necesario para que podamos llegar a la segunda <b><i><span style="color: #cc0000;">TIR</span></i></b>. Con este parámetro le suministramos a la función un número aproximado al valor de la segunda <b><i><span style="color: #cc0000;">TIR</span></i></b> y entonces excel lo que hace es calcularla por nosotros. </span></div><div style="text-align: justify;"><span style="font-family: arial;">El valor debe ser mas cercano a la segunda que a la primer <b><i><span style="color: #cc0000;">TIR</span></i></b> (ahora con python vamos a confirmarlo gráficamente).</span></div><p></p><p style="text-align: justify;"><span style="font-family: arial;">Miremos lo que pasa si en estimar ponemos un 10%:</span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg464MRShQc2R4Vh2vq9_J0lXqJ7z4kiNWUuY0EgMsrecHC0l_NsC7r2tEe5VTZDrBPejYR5qAysoFhlXcm0VZKdalsWLMXFa_AUcb7NWGi2aric3Xarth3WuKVnv4kKjYmFQtV1UrpTx7IzhNbjsHUO-xTH-0mLueICL3uhGwWcMr60baN_VJAA5zdDg/s2732/TIR%201.4.3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg464MRShQc2R4Vh2vq9_J0lXqJ7z4kiNWUuY0EgMsrecHC0l_NsC7r2tEe5VTZDrBPejYR5qAysoFhlXcm0VZKdalsWLMXFa_AUcb7NWGi2aric3Xarth3WuKVnv4kKjYmFQtV1UrpTx7IzhNbjsHUO-xTH-0mLueICL3uhGwWcMr60baN_VJAA5zdDg/w640-h480/TIR%201.4.3.png" width="640" /></a></div><p style="text-align: justify;"><span></span></p><a name='more'></a><p></p><p style="text-align: justify;"><span style="font-family: arial;">En este caso, llegamos nuevamente a la primer <b><i><span style="color: #cc0000;">TIR</span></i></b> y es porque 10% esta más cerca de 6,34% que de 60,20%.</span></p><p style="text-align: justify;"><span style="font-family: arial;">En problemas como este, se recomienda graficar el <b><i><span style="color: #cc0000;">perfil del VPN</span></i></b>, que es lo que vamos a hacer a continuación con un <b><i><span style="color: #cc0000;">script en python</span></i></b>:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxerEb3ILdkEYnvL6fdjrVc-J0VBVrPpVp0KzMnHrWZjf4P--SIX32Wyoqgr9IUE82LR_CxWN7FuukXuNnM-k49Yc6s0il83JHkd7iFKdnBTejVVDczebykf6eRxU4q5ejU6qqPX2CLhUnyddXLKIgucGLqolSi_R1DznQoApLO7u4yzYwZrgmVv0kqA/s2732/TIR%201.4.4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxerEb3ILdkEYnvL6fdjrVc-J0VBVrPpVp0KzMnHrWZjf4P--SIX32Wyoqgr9IUE82LR_CxWN7FuukXuNnM-k49Yc6s0il83JHkd7iFKdnBTejVVDczebykf6eRxU4q5ejU6qqPX2CLhUnyddXLKIgucGLqolSi_R1DznQoApLO7u4yzYwZrgmVv0kqA/w640-h480/TIR%201.4.4.png" width="640" /></a></div><br /><span style="font-family: arial;">Como podemos ver en la gráfica, hay dos puntos donde nuestro VPN se vuelve cero. Por definición: <b><i><span style="color: #cc0000;">La TIR es la tasa que hace nuestro VPN igual a cero</span></i></b>:</span><p></p><p style="text-align: justify;"><span style="font-family: arial;"></span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-family: arial;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidJCCo1QsNk-xSWGJdk-KzoN7_S23eg1-_qcwaBLTCHlqbZe5c-vhZYVm3a7ckGgGZOIkIdoRZqjmfPBY9Hhx_WNPIGYG6hWPAGOt3oqTlkO6hmeg58KbvHmhDJAL-meGAKlb2zMqRCqFG6bLgU6GMpS8-zj26T6mjm8b5aADM5-y2VsmxbjmfF2oezA/s2732/TIR%201.4.5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidJCCo1QsNk-xSWGJdk-KzoN7_S23eg1-_qcwaBLTCHlqbZe5c-vhZYVm3a7ckGgGZOIkIdoRZqjmfPBY9Hhx_WNPIGYG6hWPAGOt3oqTlkO6hmeg58KbvHmhDJAL-meGAKlb2zMqRCqFG6bLgU6GMpS8-zj26T6mjm8b5aADM5-y2VsmxbjmfF2oezA/w640-h480/TIR%201.4.5.png" width="640" /></a></span></div><span style="font-family: arial;"><br />Por último, como pueden ver en la gráfica, si nuestro costo de oportunidad es el 20%, deberíamos aceptar el proyecto, pues obtendremos un VPN positivo, cercano a $75.</span><div><span style="font-family: arial;"> </span><div><span style="font-family: arial;">A continuación el código fuente:</span><p></p><p style="text-align: justify;"><span style="font-family: arial;"><script src="https://gist.github.com/edualzate/c0d6e352f4dddd47f0960568279cc21c.js"></script></span></p></div></div>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-83795778341863362032022-03-19T13:49:00.001-05:002022-03-19T13:49:07.560-05:00Financial Modeling - Ejercicio 3 Capítulo1 , Punto de Indiferencia - Simon Benninga<p style="text-align: justify;"><span style="font-family: arial;">Hola a todos, continuando con los ejercicios del libro: <i><b><span style="color: #cc0000;">Financial Modeling de Simon Benninga,</span></b></i> hoy vamos a desarrollar el ejercicio 3 del capítulo 1:</span></p><p style="text-align: justify;"><span style="font-family: arial;">3. You are offered an investment with the following conditions: </span></p><p style="text-align: justify;"><span style="font-family: arial;">• The cost of the investment is 1,000.</span></p><p style="text-align: justify;"><span style="font-family: arial;">• The investment pays out a sum X at the end of the first year; this payout grows at the rate of 10% per year for 11 years.</span></p><p style="text-align: justify;"><span style="font-family: arial;">If your discount rate is 15%, calculate the smallest X which would entice you to purchase the asset. For example, as you can see in the following display, X = $100 is too small—the NPV is negative:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjKFUdja-y-5WINGs2vAqlJRxh1ODXy3ZK5-AyeV13nPU8rhoF1sPAhPdEqofo4JhnpGE730MDkMD9rcZfbLi3SMzYhyu-IysfmvkyiUDNJ12rANnRotz-TkGsIU9xYXNCIgxcByJTJ5gjs4Sr2rpapOfBrBbV7SQcJpLtxwvRDxmkjNFbofy-Ypboew/s1260/1.3.1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1016" data-original-width="1260" height="516" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjKFUdja-y-5WINGs2vAqlJRxh1ODXy3ZK5-AyeV13nPU8rhoF1sPAhPdEqofo4JhnpGE730MDkMD9rcZfbLi3SMzYhyu-IysfmvkyiUDNJ12rANnRotz-TkGsIU9xYXNCIgxcByJTJ5gjs4Sr2rpapOfBrBbV7SQcJpLtxwvRDxmkjNFbofy-Ypboew/w640-h516/1.3.1.png" width="640" /></a></div><p style="text-align: justify;"><span style="font-family: arial;">Tabla 1.</span></p><br /><span style="color: #6aa84f; font-family: arial;"><b><i>Traducción:</i></b></span><p></p><p style="text-align: justify;"><span style="font-family: arial;">3. Le ofrecen una inversión con las siguientes condiciones:</span></p><p style="text-align: justify;"></p><ul><li><span style="font-family: arial;">El valor a invertir son 1,000.</span></li><li><span style="font-family: arial;">La inversión paga una suma X al final del primer año; este pago se incrementa un 10% al año por los próximos 11 años.</span></li></ul><div><span style="font-family: arial;">Si su tasa de descuento es del 15%, calcule el valor de X más pequeño, con el que la inversión es atractiva para usted. Por ejemplo, como se ve en la tabla 1, cuando X = 100, el valor es muy pequeño y se llega a un <i><b><span style="color: #cc0000;">VPN</span></b></i> negativo.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">Para resolver este problema, vamos a construir el siguiente <b><i><span style="color: #cc0000;">modelo financiero en Excel:</span></i></b></span></div><div><span style="font-family: arial;"><br /></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ8J8p8twCO3CKnp2Q-Z097FbzJD889oM6gBOYPiXE4Z7gaq-unChJyevSYTi7MLfyNsVO-i5d2NVo82heWKiUDGH4NvEwel7sAnxa-yzDdJeb9P8_pQTJQlKjo3JCxGUfwq37Rq-5dbGzqt10FGrpY9jYtsiG74EVtzfDBdHrsJrmaioUx0eGrzfaZQ/s2732/1.3.2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ8J8p8twCO3CKnp2Q-Z097FbzJD889oM6gBOYPiXE4Z7gaq-unChJyevSYTi7MLfyNsVO-i5d2NVo82heWKiUDGH4NvEwel7sAnxa-yzDdJeb9P8_pQTJQlKjo3JCxGUfwq37Rq-5dbGzqt10FGrpY9jYtsiG74EVtzfDBdHrsJrmaioUx0eGrzfaZQ/w640-h480/1.3.2.png" width="640" /></a></div><br /><div style="text-align: justify;"><span style="font-family: arial;">En este modelo, necesitamos poner a variar la celda B7, cuyo valor original es $100, podemos hacerlo manualmente o utilizando la funcionalidad buscar objetivo que trae <i><b><span style="color: #cc0000;">Excel</span></b></i>. Lo importante es que lleguemos a que el valor del VPN (celda B3) sea igual a cero. </span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Entonces, a partir de un flujo en el año 1 de $129,29 tenemos un VPN de 0, es decir no hay ni construcción ni destrucción de valor, a este cifra se le conoce como valor de indiferencia para decidirnos por la inversión, cualquier número que este por encima de $129,29, agregará valor para el inversionista. Sin embargo, hay que tener en cuenta que con VPN muy pequeños, y al analizar los riesgos de cada flujo, puede ser que no sea suficiente para decidirnos a invertir.</span></div></div>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-42741082399694665062022-03-16T18:58:00.004-05:002022-03-19T13:49:20.130-05:00Financial Modeling - Ejercicio 2 Capítulo 1, Tabla Amortización Préstamo - Simon Benninga<p style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy vamos a continuar con los ejercicios del libro: <b><span style="color: #cc0000;"><a href="https://eduardoalzate.blogspot.com/2022/03/financiale-modeling-ejercicio-1.html" target="_blank">Financial Modeling de Simon Benninga</a></span></b>, hoy vamos a trabajar el ejercicio 2 del capítulo 1 que dice así:</span></p><p style="text-align: justify;"><span style="font-family: arial;">2. <span style="text-align: left;">You just took a $10,000, 5-year loan. Payments at the end of each year are flat (equal in every year) at an interest rate of 15%. </span></span><span style="font-family: arial; text-align: left;">Calculate the appropriate loan table, showing the breakdown in each year between principal and interest.</span></p><p style="text-align: justify;"><span style="font-family: arial; text-align: left;"><b><span style="color: #6aa84f;">Traducción:</span></b></span></p><p style="text-align: justify;"><span style="font-family: arial; text-align: left;">2. Usted toma un préstamo a 5 años. Se amortiza con pagos iguales al final de cada año con una tasa de interés del 15%. Calcule la tabla del préstamo, separando para cada año los abonos a capital e intereses.</span></p><p style="text-align: justify;"><span style="font-family: arial; text-align: left;"><br /></span></p><p style="text-align: justify;"><span style="font-family: arial; text-align: left;">Este ejercicio lo vamos a resolver construyendo el siguiente <span style="color: #cc0000;"><b>modelo financiero en Excel</b></span>:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhm2fhYww1elKomDbJ5DSkMhNRzgOfowVY0Ik5SMCmJX_1EX_BhWp29ZaVO-bN9ivhCWnCtfJ858LGxbE7vYRHf4s1PIq0MOnxMRXrkAG43mRPNgd-pWng3FycYGE7HCSy_s33_hiOAKJXemvD1DH2hXFJolgfcJlD3PvyJnobKJ3eI1P0mKM8U9q73ig=s2732" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEhm2fhYww1elKomDbJ5DSkMhNRzgOfowVY0Ik5SMCmJX_1EX_BhWp29ZaVO-bN9ivhCWnCtfJ858LGxbE7vYRHf4s1PIq0MOnxMRXrkAG43mRPNgd-pWng3FycYGE7HCSy_s33_hiOAKJXemvD1DH2hXFJolgfcJlD3PvyJnobKJ3eI1P0mKM8U9q73ig=w640-h480" width="640" /></a></div><br /><span style="font-family: arial; text-align: left;">En el modelo, para cada año podemos identificar claramente los abonos a capital en (columna B), los intereses que se pagan en cada periodo (columna C), el valor de la <b><span style="color: #cc0000;">cuota fija mensual</span></b> (columna D) y el saldo a capital después de pagar la cuota de cada año. Entre las columnas H y K, se encuentra la formulación del modelo.</span><p></p><p style="text-align: justify;"><span style="font-family: arial; text-align: left;">Para llegar al mismo resultado en <b><span style="color: #cc0000;">Python</span></b>, vamos a utilizar un <a href="https://eduardoalzate.blogspot.com/2020/10/construyendo-una-tabla-de-amortizacion.html" target="_blank">script que hicimos en un ejercicio anterior</a>, solo vamos a cambiar los parámetros de entrada del modelo y lo vamos a ejecutar:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEg0TFBBiNBN3tzTWwLAEAacnPlYEyFoktBP36X-n1jQImejtSbajSWiQiG9cUoxU349Gh1qSGM1BTCjVXjuLv6FZ68I9t5SkgM-ObbjVzyTogvwQFxcEGF9IB-RO9l0wdqiYDZ85Gle2Zsr8Ubi4cCOtMnsc_sJti0H_HTWqPc658Q5ELv10ZQJduvRBw=s2732" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEg0TFBBiNBN3tzTWwLAEAacnPlYEyFoktBP36X-n1jQImejtSbajSWiQiG9cUoxU349Gh1qSGM1BTCjVXjuLv6FZ68I9t5SkgM-ObbjVzyTogvwQFxcEGF9IB-RO9l0wdqiYDZ85Gle2Zsr8Ubi4cCOtMnsc_sJti0H_HTWqPc658Q5ELv10ZQJduvRBw=w640-h480" width="640" /></a></div><br /><div style="text-align: left;"><span style="font-family: arial;">Después de actualizar las variables capital, tasa y plazo y ejecutar el script, tenemos:</span></div><div style="text-align: left;"><span><a name='more'></a></span><span style="font-family: arial;"><br /></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj3hGx1nHUhSUMuLOF6ae6V-HuzTp_4NZ_4xdjynmPGmMsoN_WTeWtZmJibY81z7D6R9sd1wLdm3ELqAo20gvQe74rOZNKYMX0hZpC9P_RcScYZLsVAr-GbDh1T1MBAWelxQfVt4TLWyI1oCoqYCcL41Ny3kRMPhPqWWXl1_pkIQ25h-prXSlcvRNvqag=s2732" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEj3hGx1nHUhSUMuLOF6ae6V-HuzTp_4NZ_4xdjynmPGmMsoN_WTeWtZmJibY81z7D6R9sd1wLdm3ELqAo20gvQe74rOZNKYMX0hZpC9P_RcScYZLsVAr-GbDh1T1MBAWelxQfVt4TLWyI1oCoqYCcL41Ny3kRMPhPqWWXl1_pkIQ25h-prXSlcvRNvqag=w640-h480" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><span style="font-family: arial;">Como pueden ver, hemos llegado al mismo resultado.</span><p></p><p style="text-align: justify;"><span style="font-family: arial;">A continuación el código fuente:</span></p><p style="text-align: justify;"><span style="font-family: arial; text-align: left;"> <script src="https://gist.github.com/edualzate/97b11952c557ee31dcdc3494572c91d0.js"></script></span></p>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-54417308019476077212022-03-15T19:40:00.006-05:002022-03-16T08:09:43.096-05:00Financial Modeling - Ejercicio 1 Capítulo 1, Compra Activo - Simon Benninga<p style="text-align: justify;"><span style="font-family: arial;">Hola a todos hoy vamos a iniciar a trabajar con los ejercicios del libro: <b><i><span style="color: #cc0000;">Financial Modeling de Simon Benninga</span></i></b>:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiorkYzBkUhTqVHXvTxaYt7CHr4kxCZ6n0TK6g5m4LsON8wxiQfkyCn7NBOBAFXF-L0tUxSCY9r3N2to7uIqnDW2p5pGkWwatb7kVNaAPzcNRmanosrNiRbS8vLizE-2MhZYB2tbfCcJEnhzfsdxE_57ISyOore4s51GRcB3_vpGtbmv1Rax-sTUKyVEQ=s500" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="500" data-original-width="395" height="640" src="https://blogger.googleusercontent.com/img/a/AVvXsEiorkYzBkUhTqVHXvTxaYt7CHr4kxCZ6n0TK6g5m4LsON8wxiQfkyCn7NBOBAFXF-L0tUxSCY9r3N2to7uIqnDW2p5pGkWwatb7kVNaAPzcNRmanosrNiRbS8vLizE-2MhZYB2tbfCcJEnhzfsdxE_57ISyOore4s51GRcB3_vpGtbmv1Rax-sTUKyVEQ=w506-h640" width="506" /></a></div><br /><div style="text-align: justify;"><span style="font-family: arial;">Un libro muy utilizado en distintas universidades para cubrir módulos de los postgrados en finanzas. El libro siempre lo he encontrado en inglés, por lo que escribiremos cada ejercicio en su texto original y haremos la traducción respectiva. El profesor Benninga (Q.E.P.D) desarrolla algunos de los ejercicios </span><b style="font-family: arial;"><i><span style="color: #cc0000;">utilizando VBA</span></i></b><span style="font-family: arial;">, en nuestro caso trataremos de utilizar </span><b style="font-family: arial;"><i><span style="color: #cc0000;">Python</span></i></b><span style="font-family: arial;">.</span></div><p></p><p style="text-align: justify;"><span style="font-family: arial;">Iniciemos entonces con el primer problema del capítulo 1:</span></p><p style="text-align: justify;"><span style="font-family: arial;">1. You are offered an asset costing $600 that has cash flows of $100 at the end of each of the next 10 years.</span></p><p style="text-align: justify;"><span style="font-family: arial;">a. If the appropriate discount rate for the asset is 8%, should you purchase it? </span></p><p style="text-align: justify;"><span style="font-family: arial;">b. What is the IRR of the asset?</span></p><p style="text-align: justify;"><span style="color: #38761d; font-family: arial;"><b>Traducción:</b></span></p><p style="text-align: justify;"><span style="font-family: arial;">1. Le ofrecen un activo que cuesta $600 y que genera flujos de caja de $100 al final de cada año durante los próximos 10 años.</span></p><p style="text-align: justify;"><span style="font-family: arial;">a. Si la tasa de descuento para el activo es 8%, debería comprarlo?</span></p><p style="text-align: justify;"><span style="font-family: arial;">b. Cual es la TIR del activo?</span></p><p style="text-align: justify;"><span style="font-family: arial;"><br /></span></p><p style="text-align: justify;"><span style="font-family: arial;">Para resolver el ejercicio, vamos a construir el siguiente modelo financiero en Excel:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEggEsSQUYO3lvZNxPgVjHi_2FXIDepPEcaPnpM6x_C58PNoxOPxkSce_AANPY0z6YPv1GAoYXVe465-VHnzu6TrX0B70JgJf8rE80NcfsT1acImVHgsSdHBqRwNeLNlvRL7C20tK5CkAyyw-xHilNph2fS_VysOpjMoJWhhiPFnbdr-7efRFNSmLDvzYA=s2732" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEggEsSQUYO3lvZNxPgVjHi_2FXIDepPEcaPnpM6x_C58PNoxOPxkSce_AANPY0z6YPv1GAoYXVe465-VHnzu6TrX0B70JgJf8rE80NcfsT1acImVHgsSdHBqRwNeLNlvRL7C20tK5CkAyyw-xHilNph2fS_VysOpjMoJWhhiPFnbdr-7efRFNSmLDvzYA=w640-h480" width="640" /></a></div><br /><span style="font-family: arial;">Entonces, partiendo de una tasa de descuento del 8%, se puede concluir que deberíamos comprar el activo, pues al calcular el <b><i><span style="color: #cc0000;">VPN</span></i></b> de los flujos que se generan a lo largo de los 10 años, vamos a obtener una generación de valor de $71 dólares (ver celda B6).</span><p></p><p style="text-align: justify;"><span style="font-family: arial;">Para el cálculo de la <b><i><span style="color: #cc0000;">TIR</span></i></b>, usaremos la función de <b><i><span style="color: #cc0000;">Excel</span></i></b> que tiene el mismo nombre, al pasarle como argumentos el rango que contiene los flujos de caja, obtenemos el resultado de 11%. Es de aclarar que la tasa obtenida es anual. Cuando calculamos la TIR, la tasa siempre esta en la misma unidad de tiempo que tienen los flujos.</span></p><p style="text-align: justify;"><span style="font-family: arial;">Para calcular el ejercicio en <i><span style="color: #cc0000;"><b>Python</b></span></i>, debemos escribir el siguiente código:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhLE_k7h9NxS7Px_dSLAGvKOM2S743OW1hPlCd4RTnk_ZWGnkU9YKcvOr-ZocsTF-fUMdcSW73H4reqc1GKuYjRihBfEWLuElnXNCC_Po6f7Q3Jpv3ejKWYO_j66Vo9kLzT-zPrCzK395NPCkIszZN_6PTTbppbETWZgJ4r8ExfgFStayfl6-dBXMukvg=s2732" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEhLE_k7h9NxS7Px_dSLAGvKOM2S743OW1hPlCd4RTnk_ZWGnkU9YKcvOr-ZocsTF-fUMdcSW73H4reqc1GKuYjRihBfEWLuElnXNCC_Po6f7Q3Jpv3ejKWYO_j66Vo9kLzT-zPrCzK395NPCkIszZN_6PTTbppbETWZgJ4r8ExfgFStayfl6-dBXMukvg=w640-h480" width="640" /></a></div><br /><span style="font-family: arial;">Con lo que llegamos al mismo resultado que obtuvimos en <b><i><span style="color: #cc0000;">Excel</span></i></b>.</span><p></p><p style="text-align: justify;"><span style="font-family: arial;">A continuación el código fuente: </span></p><p style="text-align: justify;"><span style="font-family: arial;"><script src="https://gist.github.com/edualzate/3ce2f6cfc271376127c35e9a2e2ea2ba.js"></script></span></p>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-43198242407016879972022-03-05T19:36:00.000-05:002022-03-05T19:36:13.607-05:00Trabajando en Python con la función criptográfica SHA256<div style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy vamos a trabajar en <span style="color: #cc0000;"><b>Python</b></span> con la <span style="color: #cc0000;"><b>función criptográfica SHA256</b></span>. Esta función nos permite encriptar o cifrar un mensaje de texto, una imagen, un documento en pdf o lo que sea que tengamos digitalizado en nuestro computador. También la podemos utilizar en el proceso de autenticación de una aplicación.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Este tipo de funciones, son conocidas también como <span style="color: #cc0000;"><b>funciones de una sola vía</b></span>, lo que quiere decir que con el resultado entregado por la función, no es posible devolverse y obtener los datos que fueron ingresados y encriptados.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">En <b><span style="color: #cc0000;">python</span></b>, la función <b><span style="color: #cc0000;">SHA256 (</span></b></span><span style="font-family: arial;"><b><span style="color: #cc0000;">SHA quiere decir: Secure Hash Algorithms)</span></b></span><span style="font-family: arial;"> requiere que le ingresemos como parámetro los bits del objeto que deseamos encriptar. Para esto, es necesario que primero utilicemos <b><span style="color: #cc0000;">la función encode( )</span></b>, que es la que convertirá a bits nuestro objeto.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Veamos un ejemplo del uso de la función:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;"><script src="https://gist.github.com/edualzate/53ab0f7303fcec2adeb00e941c0339c0.js"></script></span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">En la línea 5, tenemos el texto que vamos a encriptar. Y en la línea 6, utilizamos la función <span style="color: #cc0000;"><b>encode( )</b></span> para convertir a bits y luego los pasamos a la <span style="color: #cc0000;"><b>función sha256( )</b></span> para generar el proceso de encriptado.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Para visualizar el resultado, y presentarlo en formato hexadecimal, utilizaremos la función <span style="color: #cc0000;"><b>hexdigest( )</b></span>:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhhOk28P3Bml6OWp17yDa7IgfQV5kVpoBO-hd_mUGblfsbQa-SAbfwckKvXeELrkMneVOfC4uT_XOTAtSTGVu0HXRtFxysWwtqK8FNf1_p8ofKpaSgEuwLF4LiC2Bv40FRVpk5DOgPgRQJWqw7idob7DxTkxg5-ca8rP3dyHCMc4ICiTRFmbHfs1E3-zg=s2732" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2732" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEhhOk28P3Bml6OWp17yDa7IgfQV5kVpoBO-hd_mUGblfsbQa-SAbfwckKvXeELrkMneVOfC4uT_XOTAtSTGVu0HXRtFxysWwtqK8FNf1_p8ofKpaSgEuwLF4LiC2Bv40FRVpk5DOgPgRQJWqw7idob7DxTkxg5-ca8rP3dyHCMc4ICiTRFmbHfs1E3-zg=w640-h480" width="640" /></a></div><br /><span style="font-family: arial;">Como pueden ver, el resultado es una cadena hexadecimal que representa el texto “El amor en los tiempos del cólera” después de ser encriptado con la función <span style="color: #cc0000;"><b>sha256( )</b></span>.</span></div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><span style="font-family: arial;">Hasta una próxima.</span></div><div style="text-align: justify;"><br /></div>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-18975739936242067712021-12-08T08:45:00.005-05:002021-12-08T19:20:38.669-05:00Trabajando con PostgreSQL en la nube, borrado de registros (DELETE) desde Python<p style="text-align: justify;"><span style="font-family: arial;">Hola a todos, en esta nueva publicación vamos a seguir trabajando con <b><i><span style="color: #cc0000;">PostgreSQL</span></i></b> en la nube y vamos a ejecutar el borrado de registros desde la <b><i><span style="color: #cc0000;">plataforma Colab</span></i></b>, mediante un script escrito en <b><i><span style="color: #cc0000;">Python</span></i></b>.</span></p><p style="text-align: justify;"><span style="font-family: arial;">Vamos a recordar cuales son los registros que tenemos en nuestra tabla contacts, para lo que vamos a ejecutar la instrucción <a href="https://eduardoalzate.blogspot.com/2021/12/trabajando-con-postgresql-en-la-nube.html" target="_blank">SELECT como lo hicimos en el primer post</a>. Solo que esta ves el código <i><b><span style="color: #cc0000;">SQL</span></b></i> lo vamos a correr directamente en el <b><i><span style="color: #cc0000;">servidor de PostgreSQL</span></i></b>:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhJaeynHZmUa9AKTP9w-GuYcHK32w3ePsZZaHNq8dYL4ySMxLCSvLyPuqm5_v6Aq6fruBm-HcpMRcl36Bo5xWgRDvT1H99HsZ8u9G_dHWzwCRiFdfE37R8pF5qAIIGNaL8LlOLyqwypITd428FyNYSkBK53WbRX6VprodbCF-6soJ85PDwBci0ed0hPfw=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEhJaeynHZmUa9AKTP9w-GuYcHK32w3ePsZZaHNq8dYL4ySMxLCSvLyPuqm5_v6Aq6fruBm-HcpMRcl36Bo5xWgRDvT1H99HsZ8u9G_dHWzwCRiFdfE37R8pF5qAIIGNaL8LlOLyqwypITd428FyNYSkBK53WbRX6VprodbCF-6soJ85PDwBci0ed0hPfw=w640-h480" width="640" /></a></div><br /><span style="font-family: arial;">Como podemos ver en la imagen, nuestra tabla consta de 6 registros. Para este ejercicio, vamos a proceder a borrar el registro con id = 6.</span><p></p><p style="text-align: justify;"><span style="font-family: arial;">Veamos el <b><i><span style="color: #cc0000;">script en Python</span></i></b> para ejecutar la tarea:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi6ZDeLbVXzmTgUu_YvUiSpi_r23TW2D67T93D6m9KMuNamHSpwqNB4bZWM2_UT_giuASOlnqaMxwFLI1Hzl351UwQT0U9NOLf_2-kzR5f_qWWJuIqymrbgccHL1j1HR4y36sRQ0JX4Uka4-bUrEVFcuPTkScXdwJ-jA-xv8s3uYIiMrzGf-USM7cBCKQ=s2048" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEi6ZDeLbVXzmTgUu_YvUiSpi_r23TW2D67T93D6m9KMuNamHSpwqNB4bZWM2_UT_giuASOlnqaMxwFLI1Hzl351UwQT0U9NOLf_2-kzR5f_qWWJuIqymrbgccHL1j1HR4y36sRQ0JX4Uka4-bUrEVFcuPTkScXdwJ-jA-xv8s3uYIiMrzGf-USM7cBCKQ=w640-h480" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><span style="font-family: arial;"><span><a name='more'></a></span>Como pueden ver, <a href="https://eduardoalzate.blogspot.com/2021/12/trabajando-con-postgresql-en-la-nube_5.html" target="_blank">nuestro script es igual al del post anterior</a>, consta de una conexión y de un cursor mediante el que ejecutamos el código <b><i><span style="color: #cc0000;">SQL</span></i></b>, lo que hacemos es cambiar la sentencia <b><i><span style="color: #cc0000;">UPDATE</span></i></b> por la de <b><i><span style="color: #cc0000;">DELETE</span></i></b>.</span><p></p><p style="text-align: justify;"><span style="font-family: arial;">Al ejecutar el script, volvemos nuevamente al servidor de <b><i><span style="color: #cc0000;">Postgres</span></i></b> y corremos nuevamente la sentencia <b><i><span style="color: #cc0000;">SELECT</span></i></b>, para confirmar que el registro fue borrado efectivamente:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi09EeuwaeVsbNJc9yjcu0Mzosl4b44ZZht3dnLYe7_KzrsdZyAQvcT6rHaIgRFNzfI1CyFMmWlcfcQ37-MHrRTDsh6vjWEWNoIz_I1xokw81dmpiYT5PfftY1nGKXK5nu9mM8-Iex1bGTXZkPYFT16WOL2vKJrOfag29RBs8N6GnFB-sOsk5taQ31kNA=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEi09EeuwaeVsbNJc9yjcu0Mzosl4b44ZZht3dnLYe7_KzrsdZyAQvcT6rHaIgRFNzfI1CyFMmWlcfcQ37-MHrRTDsh6vjWEWNoIz_I1xokw81dmpiYT5PfftY1nGKXK5nu9mM8-Iex1bGTXZkPYFT16WOL2vKJrOfag29RBs8N6GnFB-sOsk5taQ31kNA=w640-h480" width="640" /></a></div><br /><span style="font-family: arial;">Con lo que confirmamos que efectivamente el registro con id = 6 fue borrado con éxito de nuestra tabla.</span><p></p><p style="text-align: justify;"><span style="font-family: arial;">A continuación el código fuente:</span></p><p style="text-align: justify;"><span style="font-family: arial;"><script src="https://gist.github.com/edualzate/5d41730ddee7c4c06870ea20d33bd205.js"></script></span></p>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-46105047977756263022021-12-05T07:58:00.007-05:002021-12-08T17:50:13.326-05:00Trabajando con PostgreSQL en la nube, actualización de registros (UPDATE) desde Python<div style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy vamos a continuar con la serie de publicaciones asociadas a trabajar con <b><i><span style="color: #cc0000;">PostgreSQL</span></i></b> en la nube. Ya vimos como <a href="https://eduardoalzate.blogspot.com/2021/12/trabajando-con-postgresql-en-la-nube.html" target="_blank">crear una tabla, insertar registros y consultarlos</a>.</span></div><div style="text-align: justify;"><span style="font-family: arial;">Ahora, vamos a ver como podemos actualizar los registros que ya están almacenados en las tablas de nuestra base de datos.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">El ejercicio lo vamos a desarrollar en la misma base y tabla con las que trabajamos en el <a href="https://eduardoalzate.blogspot.com/2021/12/trabajando-con-postgresql-en-la-nube.html" target="_blank">post anterior</a>.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">La tarea que queremos realizar es buscar en nuestra tabla contacts el registro con id = 5 y actualizar el nombre a: Juliana Dominguez.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiN0Nf4xgYRAYUSAy9oErJdPGBI6CNtgdAZDzaoxycHV6zO5MUOols0e6_cXIztMwqp0HtQ1pVUzcV-JRZ0W4Pkp9sXjdsni1GFOkMpNKggBpHqgQQTvmfgMHbkPAulCzZk-nBnW_FwU9fLUnthOAbl8t78XtR-1zoXDfRiWuWfT9e0V_lWDyhdlqm98Q=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEiN0Nf4xgYRAYUSAy9oErJdPGBI6CNtgdAZDzaoxycHV6zO5MUOols0e6_cXIztMwqp0HtQ1pVUzcV-JRZ0W4Pkp9sXjdsni1GFOkMpNKggBpHqgQQTvmfgMHbkPAulCzZk-nBnW_FwU9fLUnthOAbl8t78XtR-1zoXDfRiWuWfT9e0V_lWDyhdlqm98Q=w640-h480" width="640" /></a></div><span style="font-family: arial;"><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div>Actualmente, el registro con id = 5 tiene en el campo name John Doe.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Veamos como sería el código, para cumplir con el objetivo de actualizar el registro:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiGiZrwfX6Y0zgdBzPIhTGtFskOT-qNowk_hn77H1fR8Qq0cztKxPGsLDdX7gfFpeykaQNozsxdAK5ZTp6HxPJaTQt_hATaELyuFBZCubst5CRM52A86Rta15dMmb5RTzoCDtmJtGGAVSoXnmi_r_hshUEA2Zw0BH8ma-LcPMX_xv-qX3N8ZhPUJLHeRg=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEiGiZrwfX6Y0zgdBzPIhTGtFskOT-qNowk_hn77H1fR8Qq0cztKxPGsLDdX7gfFpeykaQNozsxdAK5ZTp6HxPJaTQt_hATaELyuFBZCubst5CRM52A86Rta15dMmb5RTzoCDtmJtGGAVSoXnmi_r_hshUEA2Zw0BH8ma-LcPMX_xv-qX3N8ZhPUJLHeRg=w640-h480" width="640" /></a></div><br /><span style="font-family: arial;"><span><a name='more'></a></span>Frente al script que construimos en la publicación anterior hay un par de cambios importantes. </span></div><div style="text-align: justify;"><span style="font-family: arial;">El primero es que la instrucción <b><i><span style="color: #cc0000;">SQL ya no es SELECT, ahora es UPDATE</span></i></b> y no necesitamos llamar el método <b><i><span style="color: #cc0000;">fetchall()</span></i></b>, dado que <b><i><span style="color: #cc0000;">UPDATE</span></i></b> no devuelve ningún registro. Pero si necesitamos llamar el método <b><i><span style="color: #cc0000;">commit()</span></i></b>, que nos va a confirmar la ejecución de nuestro código SQL en la base de datos.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Al ejecutar el script tenemos:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiUSx28SMRK-uwj7N6rBc0fEds6t3TUkY88s3RGsbccWpGIGPLoRVet6Tl9_2e59dp3uuHzGSshPGS7Sqqek0uujm5XJaLhWUQBhWOvN_r50vaSQRjgqt376XAK3ubKv6_0uspa9yfFHVvF-n_JnHYP1rr285CrQrJa1JbY506gjvNn1dxBxYfm3PMKIQ=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEiUSx28SMRK-uwj7N6rBc0fEds6t3TUkY88s3RGsbccWpGIGPLoRVet6Tl9_2e59dp3uuHzGSshPGS7Sqqek0uujm5XJaLhWUQBhWOvN_r50vaSQRjgqt376XAK3ubKv6_0uspa9yfFHVvF-n_JnHYP1rr285CrQrJa1JbY506gjvNn1dxBxYfm3PMKIQ=w640-h480" width="640" /></a></div><br /><span style="font-family: arial;">Si volvemos a ejecutar <a href="https://eduardoalzate.blogspot.com/2021/12/trabajando-con-postgresql-en-la-nube.html" target="_blank">el script del ejemplo anterior</a> podemos comprobar la actualización del registro:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEju5jDxKzGMwYrRYaRSQLuj5EUPDIroF9nfmMMofzobtQOyWBIGTgfm8ANKpqazYF4oRm275NhhlRn6ighV_fHeuvmeFDvTqw5ViMsjyyQLxn68vMIs6RJkho_1-jJPIjjY8ro6jISSs3CnUXyzO_Wjeq73wrAzbi-CuCLN8aEkvKYgAhM76OBxWjd16w=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEju5jDxKzGMwYrRYaRSQLuj5EUPDIroF9nfmMMofzobtQOyWBIGTgfm8ANKpqazYF4oRm275NhhlRn6ighV_fHeuvmeFDvTqw5ViMsjyyQLxn68vMIs6RJkho_1-jJPIjjY8ro6jISSs3CnUXyzO_Wjeq73wrAzbi-CuCLN8aEkvKYgAhM76OBxWjd16w=w640-h480" width="640" /></a></div><br /><span style="font-family: arial;">Podemos ver en la imagen el registro actualizado con el nuevo nombre.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">A continuación el código fuente:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;"><script src="https://gist.github.com/edualzate/186840d33ae10469f550481b5623205d.js"></script></span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><br /></div>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-71194032031923158392021-12-04T10:55:00.020-05:002021-12-08T17:50:58.977-05:00Trabajando con PostgreSQL en la nube, creación de una tabla (CREATE TABLE), inserción de registros (INSERT INTO) y consulta de datos (SELECT) desde Python<p style="text-align: justify;"><span style="font-family: arial;">Buenos días, hoy vamos a trabajar nuevamente con la base de datos <b><i><span style="color: #cc0000;">PostgreSQL</span></i></b>, solo que en esta oportunidad, no vamos a instalar el servidor en nuestro equipo, sino que vamos a operar con el servicio de <b><i><span style="color: #cc0000;">PostgreSQL</span></i></b> en la nube.</span></p><p style="text-align: justify;"><span style="font-family: arial;">Existen en internet distintas plataformas que ofrecen el servicio y que nos dan desde cuentas gratuitas de prueba, hasta cuentas con servicios dedicados para la construcción e implementación de aplicaciones críticas.</span></p><p style="text-align: justify;"><span style="font-family: arial;">En mi caso, voy a crear una cuenta en la página <a href="http://www.elephantsql.com" target="_blank">www.elephantsql.com</a> utilizando mi cuenta de <b><i><span style="color: #cc0000;">Google</span></i></b>:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjKQlX6cg6Zw61QEeGCMiaQJgTwpKlcUpi7VrgTd6TRMKY46YgHTzZv882x1mssglhNJLFJRq6-w9v-crvt9oHgJUlynMrZ0k3TJW7_vy0zz8qNwt1NuQlEMyzFMeuUHWuAjmWmzzKylTezwbzX0_XrvtzPpeLkgk3i0yqB9nUCbGm1TrwSkb0wFaAAUw=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEjKQlX6cg6Zw61QEeGCMiaQJgTwpKlcUpi7VrgTd6TRMKY46YgHTzZv882x1mssglhNJLFJRq6-w9v-crvt9oHgJUlynMrZ0k3TJW7_vy0zz8qNwt1NuQlEMyzFMeuUHWuAjmWmzzKylTezwbzX0_XrvtzPpeLkgk3i0yqB9nUCbGm1TrwSkb0wFaAAUw=w640-h480" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><span style="font-family: arial;">Y vamos a dar clic en el botón de login:</span><p></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEh0iemZOq5O5C75AAJoezmifA7c7NH3kxBcUciwo658FmLEB6EPCRJoj-SROdbpHaEAJBKUEOr7kk4mB6rlVWffKi6t7aBf345mPPVZulv17_7h8VVfNv9KFP0yT5kBmDSNHTrK3h3NWCua54lZYyl8LVIIjxvluwmx5sQo-hF2VRvYMUvMrjXIb4lmvA=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEh0iemZOq5O5C75AAJoezmifA7c7NH3kxBcUciwo658FmLEB6EPCRJoj-SROdbpHaEAJBKUEOr7kk4mB6rlVWffKi6t7aBf345mPPVZulv17_7h8VVfNv9KFP0yT5kBmDSNHTrK3h3NWCua54lZYyl8LVIIjxvluwmx5sQo-hF2VRvYMUvMrjXIb4lmvA=w640-h480" width="640" /></a></div><br /><span style="font-family: arial;"><span><a name='more'></a></span>En la interfaz de login, podemos escoger entre crear una cuenta, acceder con nuestra cuenta de <b><i><span style="color: #cc0000;">Github</span></i></b> o con la de <i><b><span style="color: #cc0000;">Google</span></b></i>. En mi caso, voy a utilizar la de <b><i><span style="color: #cc0000;">Google</span></i></b>:</span><p></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgwuoYbyywCqdu-eyeykwSlZT7bEW43kU7VfUrW0FsQHZNoaXU0J9RGtpqmNpgr-IBOc1ykygs_sRMGem2HiGDOmlNwfw21wTx54hmpS1sckIUPKEa2upPSf8yXU0kPsrGy-_7VONgirQhwtfpwgl8PPbz8Oi-u2Sm_PVXdyCylDsEUygowT9r6xAX2oA=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEgwuoYbyywCqdu-eyeykwSlZT7bEW43kU7VfUrW0FsQHZNoaXU0J9RGtpqmNpgr-IBOc1ykygs_sRMGem2HiGDOmlNwfw21wTx54hmpS1sckIUPKEa2upPSf8yXU0kPsrGy-_7VONgirQhwtfpwgl8PPbz8Oi-u2Sm_PVXdyCylDsEUygowT9r6xAX2oA=w640-h480" width="640" /></a></div><br /><span style="font-family: arial;"><span></span>Cuando ingresamos a nuestra cuenta, lo primero que debemos hacer para empezar a trabajar es crear una instancia:</span><p></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjiHAeeC_K6nbTw2mq6HKvQTvkL-FtO7dPDZnILpQu1C5HY0pow2kIOwX7TB58dTqve0xZiAsn4jqfmY9InZf9hmZh7wyifF5fWiu60vpuAnOZqRoIxLS8P8PqmWY-zpfJPSVLqSMIKki-aGSGyF5cqCzDPLh1ulbTS07umLeoa7pKSCH6ynvuN41hbhQ=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEjiHAeeC_K6nbTw2mq6HKvQTvkL-FtO7dPDZnILpQu1C5HY0pow2kIOwX7TB58dTqve0xZiAsn4jqfmY9InZf9hmZh7wyifF5fWiu60vpuAnOZqRoIxLS8P8PqmWY-zpfJPSVLqSMIKki-aGSGyF5cqCzDPLh1ulbTS07umLeoa7pKSCH6ynvuN41hbhQ=w640-h480" width="640" /></a></div><br /><span style="font-family: arial;">En mi caso, ya tengo creada una, que se llama prueba, y le voy a dar doble clic para ingresar a ella:</span><p></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhXnlaouTbM_l79ZofTz5X6AhEDyqM1lVwutau2jMeqwCSc4QNyLBdo7HU7o-kjW4FcOmkUZbsgU4mKAOR-I66J8bdZcP2dhssMqW8t6x9vtOsNAcgx76xVRLr1tSeZzBC9r8uWeA--sc7RZMKpMZD6Gxo_f6mgAJcgMn4e91GzXT5TB_ID9lodwrbEdQ=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEhXnlaouTbM_l79ZofTz5X6AhEDyqM1lVwutau2jMeqwCSc4QNyLBdo7HU7o-kjW4FcOmkUZbsgU4mKAOR-I66J8bdZcP2dhssMqW8t6x9vtOsNAcgx76xVRLr1tSeZzBC9r8uWeA--sc7RZMKpMZD6Gxo_f6mgAJcgMn4e91GzXT5TB_ID9lodwrbEdQ=w640-h480" width="640" /></a></div><br /><span style="font-family: arial;">Para poder realizar la conexión desde <b><i><span style="color: #cc0000;">Python</span></i></b> a nuestra base de datos, vamos a utilizar la información de los campos que he resaltado en rojo.</span><p></p><p style="text-align: justify;"><span style="font-family: arial;">Ahora, vamos a usar la opción browser, desde donde podremos insertar instrucciones <b><i><span style="color: #cc0000;">SQL</span></i></b>, para gestionar nuestra base de datos:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiOjq3wkqEe88HzIQZJEb25_gbhIxCJty4Cz2WjWk6Uykb0aY23ZVr4DGtgA81quNd5IiWD-twgbc-uT7hJC5-Owe6gG7jX_XEecXD56bUcisPhOJ3nPQPytLysDex_o5_SUCAme2rRAw3yVSLhGo0F7RH5lPWSc-a1rzud-MJ5cNezcquQPpbu6of3Ng=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEiOjq3wkqEe88HzIQZJEb25_gbhIxCJty4Cz2WjWk6Uykb0aY23ZVr4DGtgA81quNd5IiWD-twgbc-uT7hJC5-Owe6gG7jX_XEecXD56bUcisPhOJ3nPQPytLysDex_o5_SUCAme2rRAw3yVSLhGo0F7RH5lPWSc-a1rzud-MJ5cNezcquQPpbu6of3Ng=w640-h480" width="640" /></a></div><br /><span style="font-family: arial;">Y en el campo de texto, vamos a ingresar el código para crear una tabla de pruebas. Para este ejemplo, vamos a utilizar el código de la siguiente <a href="https://sqltrainning.wordpress.com/2017/05/01/postgresql-creando-bases-de-datos-tablas-y-constraints/" target="_blank">página</a>:</span><p></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhgZ4wCmMnbGdh4muHfB2B_gP3mDF-bPnyhiIB7z_KYs3X2ukniAYh_zzf8234kIXlAL5McDxfeqcPKzIMqrLBSh3ySj8Xj4bWWWOeUQhKKdLly9JLN1qwvkrOmyfcafmBvsDKw1WVvnbGcIa6PRT1OVXXTfRrTrufw6AVEHOZ953uvyV6AZdZaEBmx9A=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEhgZ4wCmMnbGdh4muHfB2B_gP3mDF-bPnyhiIB7z_KYs3X2ukniAYh_zzf8234kIXlAL5McDxfeqcPKzIMqrLBSh3ySj8Xj4bWWWOeUQhKKdLly9JLN1qwvkrOmyfcafmBvsDKw1WVvnbGcIa6PRT1OVXXTfRrTrufw6AVEHOZ953uvyV6AZdZaEBmx9A=w640-h480" width="640" /></a></div><br /><span style="font-family: arial;">Y usamos el siguiente <b><i><span style="color: #cc0000;">SQL con la instrucción CREATE TABLE</span></i></b>, para crear la tabla contacts:</span><p></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiNnnVLTNqaQAAoEVB4JFcmu74XBxCYW2ttvTJB6bQ_eF7RLr6DpPY3SbnNahufxXZGMjXnKRcxnKBqtyu48RnMLvf2OxgID9N42YyHjD15PYRN_Z_8ctt-szxkDPelUefMb-eVXZul2ulJTTBzULX0GSWvM4UUDo9VRuN-C8EqDYbNDbiNNR9wpc1pQg=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEiNnnVLTNqaQAAoEVB4JFcmu74XBxCYW2ttvTJB6bQ_eF7RLr6DpPY3SbnNahufxXZGMjXnKRcxnKBqtyu48RnMLvf2OxgID9N42YyHjD15PYRN_Z_8ctt-szxkDPelUefMb-eVXZul2ulJTTBzULX0GSWvM4UUDo9VRuN-C8EqDYbNDbiNNR9wpc1pQg=w640-h480" width="640" /></a></div><br /><span style="font-family: arial;">Y damos clic en ejecutar:</span><p></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhEdcNkmIZu-5A3m4JdDsrgHjHCUw60YmkPedq8BEpocDS8fbFOoBBCpf_5FGw1v2drasr5oo7gjosBJ1FWRsVicZJzyWV7qFreawKBlaFstz-e3t-uVBBEkex0hNRQIw4F6H_22l9F1P4bWSGsgxJr8ZnLZhj7BqSdiZAimnRVWLUX8CftgoABjRhlDg=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEhEdcNkmIZu-5A3m4JdDsrgHjHCUw60YmkPedq8BEpocDS8fbFOoBBCpf_5FGw1v2drasr5oo7gjosBJ1FWRsVicZJzyWV7qFreawKBlaFstz-e3t-uVBBEkex0hNRQIw4F6H_22l9F1P4bWSGsgxJr8ZnLZhj7BqSdiZAimnRVWLUX8CftgoABjRhlDg=w640-h480" width="640" /></a></div><br /><span style="font-family: arial;">Ya con nuestra tabla creada, vamos a insertar datos en la misma. Para esto, utilizaremos la instrucción <b><i><span style="color: #cc0000;">INSERT INTO</span></i></b>:</span><p></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEg4buhW-8MtLfW4Laf4R5e4XKzxP1Qr8xiaOZAECIU4e-G0dev-lGgqZ4OehbR5FLmAOhGUI5n09Q1dmpWsRUBOR06M_X2Yd1CYxcQBJQShYCLhwJSleKzjZ0PQyaLUaCJmyJsvFq5GklDDia3p9oSIK1gi6mKQ_bXQ8judnOsKmV-RkUlAr4gEUTw8Mg=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEg4buhW-8MtLfW4Laf4R5e4XKzxP1Qr8xiaOZAECIU4e-G0dev-lGgqZ4OehbR5FLmAOhGUI5n09Q1dmpWsRUBOR06M_X2Yd1CYxcQBJQShYCLhwJSleKzjZ0PQyaLUaCJmyJsvFq5GklDDia3p9oSIK1gi6mKQ_bXQ8judnOsKmV-RkUlAr4gEUTw8Mg=w640-h480" width="640" /></a></div><br /><span style="font-family: arial;">Podemos utilizar la misma instrucción para crear unos cuantos registros de prueba. Ahora, vamos a pasar a <b><i><span style="color: #cc0000;">Python</span></i></b>. </span><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">En este ejemplo, lo vamos a hacer utilizando <b><i><span style="color: #cc0000;">la plataforma Colab de Google</span></i></b>, y vamos a escribir el siguiente script:</span><p></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEg4M1P39Wfg4NJk_DIILhWd-T1lHoeLJUruX0nOctKgzKVRMYA0hYn-Aaw2YDgGjvQE0Dxk2-E2X67yeyqQZXE7RlFbVCIrq2CE4HJNoYLe31bo-pLIpy8BBsxrZpq_tlF4UJWNXlbmG0-8Kr9Au6m59WROiWPg1_jEX93VHzcaWvlRQf7eR1eeLo1b7w=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEg4M1P39Wfg4NJk_DIILhWd-T1lHoeLJUruX0nOctKgzKVRMYA0hYn-Aaw2YDgGjvQE0Dxk2-E2X67yeyqQZXE7RlFbVCIrq2CE4HJNoYLe31bo-pLIpy8BBsxrZpq_tlF4UJWNXlbmG0-8Kr9Au6m59WROiWPg1_jEX93VHzcaWvlRQf7eR1eeLo1b7w=w640-h480" width="640" /></a></div><br /><div style="text-align: justify;"><span style="font-family: arial;">Las dos primeras líneas de importación, nos permiten incluir los </span><b style="font-family: arial;"><i><span style="color: #cc0000;">paquetes tabulate y psycopg2</span></i></b><span style="font-family: arial;">. El primero es para formatear y presentar los datos que vamos a consultar. El segundo, nos permite conectarnos a nuestra base de datos y enviar instrucciones SQL para que sean ejecutadas en la misma.</span></div><p></p><p style="text-align: justify;"><span style="font-family: arial;">En la información de conexión, debemos incluir los datos que vimos cuando ingresamos a nuestra instancia de base de datos.</span></p><p style="text-align: justify;"><span style="font-family: arial;">Se construye la conexión y mediante un cursos enviamos el código <b><i><span style="color: #cc0000;">SQL: SELECT * FROM contacts ORDER BY id, para solicitar a la base de datos que nos muestre todos los registros de la tabla contacts</span></i></b>, y mediante fetchall(), los extraemos del cursos y los guardamos en la variabl rows.</span></p><p style="text-align: justify;"><span style="font-family: arial;">El paquete tabulate, recibe como argumento un objeto iterable, que en nuestro caso es rows, lo completamos con el encabezado que queremos en nuestra tabla de presentación y listo. Al ejecutar el script se nos genera la siguiente salida:</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhQ9paHSTjIJCBdK4XpTaey-YwzWuTJRp0mNEId3Y3-s60mwTPLqZUYh2v5JGR_qmNsx3cPLJjVLtZZTM1zTIXs6fTP8rcdk9yfkYGu54b7c_CiDVG5tyLrjknSbOpYiz93_NiJLgdeQWahJUAvzZEe3AMWg1gLSpQfrdCHt7n8hyov18SoC5lqL7ipAQ=s2048" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1535" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEhQ9paHSTjIJCBdK4XpTaey-YwzWuTJRp0mNEId3Y3-s60mwTPLqZUYh2v5JGR_qmNsx3cPLJjVLtZZTM1zTIXs6fTP8rcdk9yfkYGu54b7c_CiDVG5tyLrjknSbOpYiz93_NiJLgdeQWahJUAvzZEe3AMWg1gLSpQfrdCHt7n8hyov18SoC5lqL7ipAQ=w640-h480" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><span style="font-family: arial;">A continuación el código fuente:</span><p></p><p style="text-align: justify;"><span style="font-family: arial;"><script src="https://gist.github.com/edualzate/f34c1692dbb8f5309e6cbf3690128192.js"></script></span></p><p style="text-align: justify;"><span style="font-family: arial;"> </span></p></div><span><!--more--></span><span><!--more--></span><span><!--more--></span>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-46216593776165758452021-10-31T10:17:00.003-05:002021-10-31T10:27:12.959-05:00Matemática Financiera: Ejercicios 5.4, Problema 34 - Compra de Tractor con Pagos en Mora - José Luis Villalobos<div style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy vamos a continuar con los ejercicios del libro: <a href="https://eduardoalzate.blogspot.com/2020/11/matematica-financiera-ejercicios-41.html" target="_blank">Matemáticas Financieras Tercera Edición del autor José Luis Villalobos.</a> </span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Vamos a trabajar el problema 34 y <i><b><span style="color: #cc0000;">lo resolveremos en excel</span></b></i>:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">34. El ingeniero Ramírez compró un tractor con un anticipo de $52,000 y 18 abonos mensuales vencidos de $15,750. Luego de efectuar el sexto se retrasa con 7. ¿Con cuánto se pone al corriente al hacer el pago 14, si le cargan intereses del 10.68% anual, capitalizable por meses?</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Para resolver el problema, vamos a construir el siguiente <i><b><span style="color: #cc0000;">modelo financiero en excel: </span></b></i></span></div><div style="text-align: justify;"><span style="font-family: arial;"><i><b><span style="color: #cc0000;"><br /></span></b></i></span></div><div style="text-align: justify;"><span style="font-family: arial;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9jtz_o832HFgUStaKMZIb5Waulq3ImP1wGLN-rxsBNPR4PYO6fZGcZDaNJyPyxZ3PDHMZkph7kRVWMrMnk5vRNrSJYEdbx3NUVnYhTteBcPkJ_DS148XW_C6VfuB1_C5qllS065Tl7-FH/s1920/5.4.34.1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9jtz_o832HFgUStaKMZIb5Waulq3ImP1wGLN-rxsBNPR4PYO6fZGcZDaNJyPyxZ3PDHMZkph7kRVWMrMnk5vRNrSJYEdbx3NUVnYhTteBcPkJ_DS148XW_C6VfuB1_C5qllS065Tl7-FH/w640-h360/5.4.34.1.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div></span></div><div style="text-align: justify;"><span style="font-family: arial;">Veamos en el siguiente video, como es el paso a paso para construir el modelo y utilizar Buscar Objetivo:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="541" src="https://www.youtube.com/embed/sE-71wcBE3o" width="653" youtube-src-id="sE-71wcBE3o"></iframe></div><br /><span style="font-family: arial;">Entonces, el valor con el que el ingeniero Ramírez se pone al corriente en el pago 14 es de $129,996.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Hasta una próxima.</span></div>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247257487555238 -110.65901711779098 33.373206087555239 -40.346522482209011tag:blogger.com,1999:blog-1620163225519000302.post-77625375318514055812021-10-30T18:12:00.005-05:002021-10-30T18:12:37.190-05:00Matemática Financiera: Ejercicios 5.4, Problema 25 - Renta Mensual Anticipada Equivalente - José Luis Villalobos<div style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy vamos a continuar con los ejercicios del libro: <a href="https://eduardoalzate.blogspot.com/2020/11/matematica-financiera-ejercicios-41.html" target="_blank">Matemáticas Financieras Tercera Edición del autor José Luis Villalobos.</a> </span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Vamos a trabajar el problema 25 y <i><b><span style="color: #cc0000;">lo resolveremos en excel</span></b></i>:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">25. Es la renta mensual anticipada equivalente a $5,000 trimestrales anticipados, considerndo intereses del 15% efectivo.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Para resolver el problema, vamos a construir el siguiente <i><b><span style="color: #cc0000;">modelo financiero en excel: </span></b></i></span></div><div style="text-align: justify;"><span style="font-family: arial;"><i><b><span style="color: #cc0000;"><br /></span></b></i></span></div><div style="text-align: justify;"><span style="font-family: arial;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqfr9mGiJA2sSUSzgg_e5mybBUZO4IEh_TvgsQnplNJZj8iurZbY3S5O3QLHXHwOFdrWABS7i8-QgXiLjUh7xwTT1HH6q5OLPQ9f3pBRQ1bHARgnr-Em1bn32K5tlaHGLN8mbxfXmh8FTm/s1920/5.4.1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqfr9mGiJA2sSUSzgg_e5mybBUZO4IEh_TvgsQnplNJZj8iurZbY3S5O3QLHXHwOFdrWABS7i8-QgXiLjUh7xwTT1HH6q5OLPQ9f3pBRQ1bHARgnr-Em1bn32K5tlaHGLN8mbxfXmh8FTm/w640-h360/5.4.1.png" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><span>Lo primero que tenemos que hacer en este ejercicio es calcular la tasa mensual. Esto lo hacemos en la celda B4. El cálculo de la renta mensual equivalente anticipada, lo vamos a realizar utilizando la <b><i><span style="color: #cc0000;">función PAGO() de excel</span></i></b>. </span></span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Como podemos ver en nuestro modelo, en la celda B6, el valor es de $1,686.12.</span></div>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-40358614206309723482021-10-28T21:20:00.002-05:002021-10-30T18:07:40.976-05:00Matemática Financiera: Ejercicios 5.3, Problema 34 - Compra de Maquinaria con Anticipo y Financiación 2 - José Luis Villalobos<div style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy vamos a continuar con los ejercicios del libro: <a href="https://eduardoalzate.blogspot.com/2020/11/matematica-financiera-ejercicios-41.html" target="_blank">Matemáticas Financieras Tercera Edición del autor José Luis Villalobos.</a> </span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Vamos a trabajar el problema 34 y <i><b><span style="color: #cc0000;">lo resolveremos en excel</span></b></i>:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">34. En el problema 33,</span><span style="font-family: arial;"> ¿De qué cantidad sería cada abono si fueran bimestrales</span><span style="font-family: arial;">?</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Para resolver el problema, vamos a construir el siguiente <i><b><span style="color: #cc0000;">modelo financiero en excel: </span></b></i></span></div><div style="text-align: justify;"><span style="font-family: arial;"><i><b><span style="color: #cc0000;"><br /></span></b></i></span></div><div style="text-align: justify;"><span style="font-family: arial;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX8dfVDIgIFJ1A5JxfQ3dcdHL7digY8bG9e7GoUw0wwRhZdIdUzFaTusaYVXLw-tHOzign60HjMwSFrurwoWjeGOfCQJAMKcz1JpEhrSmj-Z3u9Wlt1oJFUGQK7S_cjF0t_yTCOm1K_wzM/s1920/5.34.1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX8dfVDIgIFJ1A5JxfQ3dcdHL7digY8bG9e7GoUw0wwRhZdIdUzFaTusaYVXLw-tHOzign60HjMwSFrurwoWjeGOfCQJAMKcz1JpEhrSmj-Z3u9Wlt1oJFUGQK7S_cjF0t_yTCOm1K_wzM/w640-h360/5.34.1.png" width="640" /></a></div><br /><div class="separator" style="clear: both; font-style: italic; font-weight: bold; text-align: center;"><br /></div><span>Lo primero que tenemos que hacer en este ejercicio es calcular la tasa bimestral. Esto lo hacemos en la celda B11. El cálculo de la cuota, lo vamos a realizar utilizando la <b><i><span style="color: #cc0000;">función PAGO() de excel</span></i></b>. </span></span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Como podemos ver en nuestro modelo, en la celda B12, el valor de la cuota bimestral es de $254,638.00.</span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1620163225519000302.post-50493778515424836552021-10-27T19:38:00.003-05:002021-10-28T06:13:44.981-05:00Matemática Financiera: Ejercicios 5.3, Problema 33 - Compra de Maquinaria con Anticipo y Financiación - José Luis Villalobos<div style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy vamos a continuar con los ejercicios del libro: <a href="https://eduardoalzate.blogspot.com/2020/11/matematica-financiera-ejercicios-41.html" target="_blank">Matemáticas Financieras Tercera Edición del autor José Luis Villalobos.</a> </span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Vamos a trabajar el problema 33 y <i><b><span style="color: #cc0000;">lo resolveremos en excel y python</span></b></i>:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">33. </span><span style="font-family: arial;">La empresa “Diseño e Impresión Virtual” compra una máquina con un anticipo del 25% y</span></div><div style="text-align: justify;"><span style="font-family: arial;">12 pagos mensuales de $95,000 con cargos del 12.36% nominal mensual. ¿Cuál es el precio</span></div><div style="text-align: justify;"><span style="font-family: arial;">de la máquina?</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Para resolver el problema, vamos a construir el siguiente <i><b><span style="color: #cc0000;">modelo financiero en excel: </span></b></i></span></div><div style="text-align: justify;"><span style="font-family: arial;"><i><b><span style="color: #cc0000;"><br /></span></b></i></span></div><div style="text-align: justify;"><span style="font-family: arial;"><div class="separator" style="clear: both; font-style: italic; font-weight: bold; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKxwvAaGnfDan8s1yDwU1XMyXsjtR_c-mJngQ20okGHvD4jmUxJDcpdrYFFa6GC1mccQWNbV1U6S7jWI75rniJHUWGDLsn5VobNyGnQTZ41eB1vrx2Y6qxt0zCG2S0mTRNolJ-t5SpfTM8/s1920/5.33.1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKxwvAaGnfDan8s1yDwU1XMyXsjtR_c-mJngQ20okGHvD4jmUxJDcpdrYFFa6GC1mccQWNbV1U6S7jWI75rniJHUWGDLsn5VobNyGnQTZ41eB1vrx2Y6qxt0zCG2S0mTRNolJ-t5SpfTM8/w640-h360/5.33.1.png" width="640" /></a></div><br /><span>En este ejercicio tenemos un precio inicial de la maquina que es desconocido. Sabemos, que el 75% de ese precio al financiarlo con las condiciones planteadas, se paga con cuotas uniformes de $95,000. Entonces lo primero que vamos a hacer es encontrar cual es el valor presente equivalente a las 12 cuotas, para esto utilizaremos la <b><i><span style="color: #cc0000;">función VA() de excel</span></i></b>. </span></span></div><div style="text-align: justify;"><span style="font-family: arial;"><span><br /></span></span></div><div style="text-align: justify;"><span style="font-family: arial;"><span>Como podemos ver en nuestro modelo, en la celda B8, tenemos que el valor presente de dichas cuotas y que equivale al 75% del precio de la máquina, es de $1,067,208.43.</span></span></div><div style="text-align: justify;"><span style="font-family: arial;"><span><br /></span></span></div><div style="text-align: justify;"><span style="font-family: arial;"><span>Ahora, para determinar el precio del 100% de la máquina, dividimos ese valor presente entre 75%, con lo que llegamos al 100% del precio, que en este caso es de: $1,422,944.57.</span></span></div><div style="text-align: justify;"><span style="font-family: arial;"><span><br /></span></span></div><div style="text-align: justify;"><span style="font-family: arial;"><span>Para resolver el problema en <b><i><span style="color: #cc0000;">python</span></i></b>, vamos a escribir el siguiente script en la <i><b><span style="color: #cc0000;">plataforma colab de google</span></b></i>:</span></span></div><div style="text-align: justify;"><span style="font-family: arial;"><span><br /></span></span></div><div style="text-align: justify;"><span style="font-family: arial;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMcysxY_fTDD8Qm-5ULFEUgUYNHNAl7vLQDy59xQ_kbapNgPfZfdORd0C8-VfYPmt7yEQ60MJi7PVlgRhr18GXUAbLh1Boyf6l572TsKVd3-Yc8tQg8lFRUdPkbiTfAo6t1HuYyXbH0UMD/s1920/5.33.2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMcysxY_fTDD8Qm-5ULFEUgUYNHNAl7vLQDy59xQ_kbapNgPfZfdORd0C8-VfYPmt7yEQ60MJi7PVlgRhr18GXUAbLh1Boyf6l572TsKVd3-Yc8tQg8lFRUdPkbiTfAo6t1HuYyXbH0UMD/w640-h360/5.33.2.png" width="640" /></a></div><br /><span>Haciendo uso de la función <i><b><span style="color: #cc0000;">pv()</span></b></i> de la librería <b><i><span style="color: #cc0000;">numpy-financial</span></i></b>, llegamos al mismo resultado que obtuvimos con anterioridad en <b><i><span style="color: #cc0000;">excel</span></i></b>.</span></span></div><div style="text-align: justify;"><span style="font-family: arial;"><span><br /></span></span></div><div style="text-align: justify;"><span style="font-family: arial;"><span>A continuación el código fuente:</span></span></div><div style="text-align: justify;"><script src="https://gist.github.com/edualzate/f5b485dcddb029b320709d5cc2d5055e.js"></script></div><div style="text-align: justify;"><span style="font-family: arial;"><span> </span></span></div><div style="text-align: justify;"><span style="font-family: arial;"><i><b><span style="color: #cc0000;"><br /></span></b></i></span></div>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-53017314481326914732021-06-14T17:20:00.001-05:002021-06-14T17:20:09.495-05:00Matemática Financiera: Ejercicios 5.3, Problema 27 - Calcular el Precio de una Batidora - José Luis Villalobos<div style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy vamos a continuar con los ejercicios del libro: <a href="https://eduardoalzate.blogspot.com/2020/11/matematica-financiera-ejercicios-41.html" target="_blank">Matemáticas Financieras Tercera Edición del autor José Luis Villalobos.</a> </span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Vamos a trabajar el problema 27 y <i><b><span style="color: #cc0000;">lo resolveremos en excel y python</span></b></i>:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">27. ¿</span><span style="font-family: arial;">Cuál es el precio de una batidora que se paga con 30 abonos semanales de $230 con intereses </span><span style="font-family: arial;">del 14.82% nominal semanal</span><span style="font-family: arial;">?</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">Para resolver el problema, vamos a construir el siguiente <i><b><span style="color: #cc0000;">modelo financiero en excel </span></b></i>(vamos a asumir el pago de las anualidades al final de cada período):</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBKxMlebBCEiEVviip2gEXB2C2GCqsH98vgs4jUXhWQ2T6Ah-4Uongjn-G3Ot2XYnazCVBRRyQkKod0tFso9mZ6IpmRzifbElJrsQEOB-3HSrOMh-rSHdd536pwCDJTpfoEYf5fFUp2epC/s1920/27.1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBKxMlebBCEiEVviip2gEXB2C2GCqsH98vgs4jUXhWQ2T6Ah-4Uongjn-G3Ot2XYnazCVBRRyQkKod0tFso9mZ6IpmRzifbElJrsQEOB-3HSrOMh-rSHdd536pwCDJTpfoEYf5fFUp2epC/w640-h360/27.1.png" width="640" /></a></div><br /><div><span style="font-family: arial;">Utilizando <i><b><span style="color: #cc0000;">la función va() de excel</span></b></i>, podemos establecer que con las condiciones planteadas, el precio de la batidora es de $6,604.24.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">Ahora, resolvamos el problema en <b><i><span style="color: #cc0000;">python </span></i></b>utilizando el siguiente script, escrito en la <i><b><span style="color: #cc0000;">plataforma colab de google</span></b></i>:</span></div></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlsGftCtJZm1ZIUTMHwlTomXnbpKQrYy6-12qHG5e7YLRXO5Cfl0clS_KCKnKzY1UoAKzfX4TSBMt_31MZt2MutBbs7iuFo2OZ-HuZ9w4eWiZHJhuzGiSvaPokqAzVNz7tWmTgTF6jMwYg/s1920/27.2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlsGftCtJZm1ZIUTMHwlTomXnbpKQrYy6-12qHG5e7YLRXO5Cfl0clS_KCKnKzY1UoAKzfX4TSBMt_31MZt2MutBbs7iuFo2OZ-HuZ9w4eWiZHJhuzGiSvaPokqAzVNz7tWmTgTF6jMwYg/w640-h360/27.2.png" width="640" /></a></div><br /><span style="font-family: arial;">Como ven, llegamos al mismo resultado que habíamos obtenido en <i><b><span style="color: #cc0000;">excel</span></b></i>. En este script, utilizamos <b><i><span style="color: #cc0000;">la función pv() de la librería numpy-financial</span></i></b>.</span></div><div style="text-align: justify;"><span style="font-family: arial;"><br /></span></div><div style="text-align: justify;"><span style="font-family: arial;">A continuación el código fuente:</span></div><div style="text-align: justify;"><span style="font-family: arial;"><script src="https://gist.github.com/edualzate/ee6717196b0a99c7e3a45bbd04404aab.js"></script></span></div>Unknownnoreply@blogger.com2Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996tag:blogger.com,1999:blog-1620163225519000302.post-62617650138903989032021-05-22T08:54:00.004-05:002021-05-22T08:54:28.852-05:00Matemática Financiera: Ejercicios 5.3, Problema 26 - Calcular el Número de Cuotas de un Préstamo - José Luis Villalobos<p style="text-align: justify;"><span style="font-family: arial;">Hola a todos, hoy vamos a continuar con los ejercicios del libro: <a href="https://eduardoalzate.blogspot.com/2020/11/matematica-financiera-ejercicios-41.html" target="_blank">Matemáticas Financieras Tercera Edición del autor José Luis Villalobos.</a> </span></p><p style="text-align: justify;"><span style="font-family: arial;">Vamos a trabajar el problema 26 y <b><i><span style="color: #cc0000;">lo resolveremos en excel y python</span></i></b>:</span></p><p style="text-align: justify;"><span style="font-family: arial;">26. ¿Cuántos abonos quincenales de $7,500 se necesitan para amortizar un adeudo de </span><span style="font-family: arial;">$148,161.16, si se tienen cargos o intereses del 13.5%?</span></p><p style="text-align: justify;"><span style="font-family: arial;">Para resolver el problema, vamos a construir el siguiente <i><b><span style="color: #cc0000;">modelo financiero en excel </span></b></i>(vamos a asumir el pago de las anualidades al final de cada período):</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkOSF7Ru3yhyphenhyphenLJt2UWC_X_83PzAJKmtEbLOyirnLDTz-hahSZ-BnWO80zNcFD3IIQOALjZEGIwQwqZws7jy6pForXhwgt29fFnneBR784tYXRt9DyCr4V_pabaPwEGjaEdbCEAFhq4wJVR/s1920/26.1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkOSF7Ru3yhyphenhyphenLJt2UWC_X_83PzAJKmtEbLOyirnLDTz-hahSZ-BnWO80zNcFD3IIQOALjZEGIwQwqZws7jy6pForXhwgt29fFnneBR784tYXRt9DyCr4V_pabaPwEGjaEdbCEAFhq4wJVR/w640-h360/26.1.png" width="640" /></a></div><div style="text-align: justify;"><br /></div><span style="font-family: arial;"><div style="text-align: justify;">Utilizando la <i><b><span style="color: #cc0000;">función nper() de excel</span></b></i>, podemos establecer que con las condiciones planteadas, el número de abonos necesarios para amortizar la deuda es de 21.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;">Ahora, resolvamos el problema en <i><b><span style="color: #cc0000;">python </span></b></i>utilizando el siguiente script, escrito en la <i><b><span style="color: #cc0000;">plataforma colab de google:</span></b></i></div><div style="text-align: justify;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLUv-xNDmLsUwMauVaUJ04pqiScUM79fSS4sfTgwlV0QfycixvA-tPS6GI7YJr0-umHpLd_A66KSwp2nWOKqSpUUU7Ekc4GO7jDllvuEZUzFSanO0YAUFjeVEL4T4T7buLfWOkuwhXHcuF/s1920/26.2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLUv-xNDmLsUwMauVaUJ04pqiScUM79fSS4sfTgwlV0QfycixvA-tPS6GI7YJr0-umHpLd_A66KSwp2nWOKqSpUUU7Ekc4GO7jDllvuEZUzFSanO0YAUFjeVEL4T4T7buLfWOkuwhXHcuF/w640-h360/26.2.png" width="640" /></a></div><br /><div style="text-align: justify;"><div>Como ven, llegamos al mismo resultado que habíamos obtenido en <b><i><span style="color: #cc0000;">excel</span></i></b>. En este script, utilizamos <b><i><span style="color: #cc0000;">la función nper() de la librería numpy-financial.</span></i></b></div><div><br /></div><div>A continuación el código fuente: </div></div><div style="text-align: justify;"><script src="https://gist.github.com/edualzate/01c5ce31c287c9cf38894b44a91e061a.js"></script></div></span><p style="text-align: justify;"><span style="font-family: arial;"><br /></span></p>Unknownnoreply@blogger.com0Manizales, Caldas, Colombia5.0629743 -75.5027698-23.247259536178845 -110.6590198 33.373208136178846 -40.346519799999996