Economics: New Applications
http://www.maplesoft.com/applications/category.aspx?cid=218
en-us2014 Maplesoft, A Division of Waterloo Maple Inc.Maplesoft Document SystemFri, 18 Apr 2014 00:18:38 GMTFri, 18 Apr 2014 00:18:38 GMTNew applications in the Economics categoryhttp://www.mapleprimes.com/images/mapleapps.gifEconomics: New Applications
http://www.maplesoft.com/applications/category.aspx?cid=218
Downloading Stock Prices and Plotting Returns Distributions
http://www.maplesoft.com/applications/view.aspx?SID=153539&ref=Feed
<p>This application:</p>
<ul>
<li>downloads historical stock prices from Yahoo Finance,</li>
<li>calculates the returns,</li>
<li>plots the distribution of the returns in a histogram,</li>
<li>and overlays a normal distribution with the same mean and standard deviation as the historical data.</li>
<li>The application uses Maple 18's improved Internet connectivity; you can now download data from a URL straight into a matrix using <span ><a href="http://www.maplesoft.com/support/help/Maple/view.aspx?path=ImportMatrix">ImportMatrix()</a></span>.</li>
</ul><img src="/view.aspx?si=153539/stockreturns.png" alt="Downloading Stock Prices and Plotting Returns Distributions" align="left"/><p>This application:</p>
<ul>
<li>downloads historical stock prices from Yahoo Finance,</li>
<li>calculates the returns,</li>
<li>plots the distribution of the returns in a histogram,</li>
<li>and overlays a normal distribution with the same mean and standard deviation as the historical data.</li>
<li>The application uses Maple 18's improved Internet connectivity; you can now download data from a URL straight into a matrix using <span ><a href="http://www.maplesoft.com/support/help/Maple/view.aspx?path=ImportMatrix">ImportMatrix()</a></span>.</li>
</ul>153539Thu, 03 Apr 2014 04:00:00 ZSamir KhanSamir KhanJump-diffusion stochastic processes with Maple
http://www.maplesoft.com/applications/view.aspx?SID=153516&ref=Feed
<p>The application presents and definition, creation and handling of jump-diffusion processes. In general, jump-diffusion is an extension to the theory of stochastic processes where the underlying parameters exhibit shocks and "jump" to their new values. Stochasticity with jumps is well recognised in several scientific branches including physics, chemistry, biology, but also economic and finance. The application looks at the example of the last-mentioned fields where the theory of jump-diffusions has been particularly actively researched and applied.</p><img src="/view.aspx?si=153516/Jump_image1.jpg" alt="Jump-diffusion stochastic processes with Maple" align="left"/><p>The application presents and definition, creation and handling of jump-diffusion processes. In general, jump-diffusion is an extension to the theory of stochastic processes where the underlying parameters exhibit shocks and "jump" to their new values. Stochasticity with jumps is well recognised in several scientific branches including physics, chemistry, biology, but also economic and finance. The application looks at the example of the last-mentioned fields where the theory of jump-diffusions has been particularly actively researched and applied.</p>153516Sat, 08 Mar 2014 05:00:00 ZIgor HlivkaIgor HlivkaThe Curse of Dimensionality
http://www.maplesoft.com/applications/view.aspx?SID=153482&ref=Feed
<p>We will in this worksheet shortly explore the Curse of Dimensionality<br />which plays an important role in ie portfolio theory.</p><img src="/view.aspx?si=153482/ffc9658f8bbbf859cc17f5d03c5a790b.gif" alt="The Curse of Dimensionality" align="left"/><p>We will in this worksheet shortly explore the Curse of Dimensionality<br />which plays an important role in ie portfolio theory.</p>153482Fri, 20 Dec 2013 05:00:00 ZMarcus DavidssonMarcus DavidssonPortfolio Optimization in Practice
http://www.maplesoft.com/applications/view.aspx?SID=147209&ref=Feed
<p>We will in this worksheet show how portfolio optimization can <br />be done for a large universe of stocks (in our case approx 8400)<br />in Maple. The results are promising.</p><img src="/view.aspx?si=147209/pp.jpg" alt="Portfolio Optimization in Practice" align="left"/><p>We will in this worksheet show how portfolio optimization can <br />be done for a large universe of stocks (in our case approx 8400)<br />in Maple. The results are promising.</p>147209Wed, 15 May 2013 04:00:00 ZMarcus DavidssonMarcus DavidssonMyFinance
http://www.maplesoft.com/applications/view.aspx?SID=146473&ref=Feed
<p>The MyFinance module solves three major problems:<br /><br />1) A procedure to calculate percentage returns for a price matrix in Maple.<br /><br />2) Get data straight into Maple from both http and https urls*<br />pointing to a csv file (Maple's HTTP:-Get() only works with http at best)<br />(This core code for this procedure was written by Axel Vogt)<br /><br />3) A CleanData procedure. Empirical financial data <br />(especially free data) is know to have "outliers" that can distort<br />the calculations. This procedure nullifies such observations.<br /><br />Copy the two files (.mla and .hdb) to maple's lib folder ie in my <br />case C:\Program Files (x86)\Maple 16\lib then you are set to go!<br /><br />* Note this procedures uses C:\\WINDOWS\\SYSTEM32<br />However I have a 64 bit computer and it still seems to works for me :-)</p><img src="/view.aspx?si=146473/6ca950bde41cbe3d97d8205cecf3c8d0.gif" alt="MyFinance" align="left"/><p>The MyFinance module solves three major problems:<br /><br />1) A procedure to calculate percentage returns for a price matrix in Maple.<br /><br />2) Get data straight into Maple from both http and https urls*<br />pointing to a csv file (Maple's HTTP:-Get() only works with http at best)<br />(This core code for this procedure was written by Axel Vogt)<br /><br />3) A CleanData procedure. Empirical financial data <br />(especially free data) is know to have "outliers" that can distort<br />the calculations. This procedure nullifies such observations.<br /><br />Copy the two files (.mla and .hdb) to maple's lib folder ie in my <br />case C:\Program Files (x86)\Maple 16\lib then you are set to go!<br /><br />* Note this procedures uses C:\\WINDOWS\\SYSTEM32<br />However I have a 64 bit computer and it still seems to works for me :-)</p>146473Fri, 10 May 2013 04:00:00 ZMarcus DavidssonMarcus DavidssonUnit Root with GARCH Variance
http://www.maplesoft.com/applications/view.aspx?SID=146469&ref=Feed
<p>We will in this worksheet explore the somewhat elusive General <br />Autoregressive Conditional Heteroskedasticity (GARCH) model. <br />The model was introduced by Robert Engle who later (in 2003) <br />won a nobel price for his work.</p>
<p>Engle, R (1982) ARCH with Estimates of Variance of United Kingdom Inflation, <br /> <em>Econometrica</em>, 50:987-1008</p><img src="/view.aspx?si=146469/146469.png" alt="Unit Root with GARCH Variance" align="left"/><p>We will in this worksheet explore the somewhat elusive General <br />Autoregressive Conditional Heteroskedasticity (GARCH) model. <br />The model was introduced by Robert Engle who later (in 2003) <br />won a nobel price for his work.</p>
<p>Engle, R (1982) ARCH with Estimates of Variance of United Kingdom Inflation, <br /> <em>Econometrica</em>, 50:987-1008</p>146469Mon, 29 Apr 2013 04:00:00 ZMarcus DavidssonMarcus DavidssonLoan Amortization Table
http://www.maplesoft.com/applications/view.aspx?SID=145819&ref=Feed
<p>By entering the <strong>loan amount</strong>, the <strong>number of years to repay the loan</strong>, the <strong>payment frequency</strong>, the <strong>annual nominal interest rate</strong>, the number of <strong>compound periods</strong> per year, and hit the "<strong>Generate Amortization Table</strong>" button. The worksheet will calculate automatically the <strong>total payments</strong>, the <strong>total interest paid</strong>, and the <strong>payment per period</strong> as well as the <strong>amortization table</strong>. To open the amortization table, just click on the triangle beside the amortization table.<br /><br /></p><img src="/view.aspx?si=145819/loanamortization_thumb.png" alt="Loan Amortization Table" align="left"/><p>By entering the <strong>loan amount</strong>, the <strong>number of years to repay the loan</strong>, the <strong>payment frequency</strong>, the <strong>annual nominal interest rate</strong>, the number of <strong>compound periods</strong> per year, and hit the "<strong>Generate Amortization Table</strong>" button. The worksheet will calculate automatically the <strong>total payments</strong>, the <strong>total interest paid</strong>, and the <strong>payment per period</strong> as well as the <strong>amortization table</strong>. To open the amortization table, just click on the triangle beside the amortization table.<br /><br /></p>145819Fri, 12 Apr 2013 04:00:00 ZZinan WangZinan WangCar Loan Calculator
http://www.maplesoft.com/applications/view.aspx?SID=145174&ref=Feed
<p>This loan calculator facilitates the life of a borrower. By entering the <strong>purchase price</strong>, the <strong>down payment</strong>, the <strong>number of years</strong> it takes to repay the loan, the <strong>payment frequency</strong>, the <strong>annual interest rate</strong>, and clicking on the "<strong>calculate</strong>" buttom, the calculator will give you the <strong>amount of payment</strong> for each payment period.</p>
<p> </p>
<p>Want to make a loan? Try it out and see how things change with respect to each element.</p><img src="/applications/images/app_image_blank_lg.jpg" alt="Car Loan Calculator" align="left"/><p>This loan calculator facilitates the life of a borrower. By entering the <strong>purchase price</strong>, the <strong>down payment</strong>, the <strong>number of years</strong> it takes to repay the loan, the <strong>payment frequency</strong>, the <strong>annual interest rate</strong>, and clicking on the "<strong>calculate</strong>" buttom, the calculator will give you the <strong>amount of payment</strong> for each payment period.</p>
<p> </p>
<p>Want to make a loan? Try it out and see how things change with respect to each element.</p>145174Wed, 27 Mar 2013 04:00:00 ZZinan WangZinan WangFloating Exchange Rate and Internal Balance
http://www.maplesoft.com/applications/view.aspx?SID=121119&ref=Feed
<p>This application examines how floating exchange rates affect the macroeconomic performance of an economy. In particular, it shows how an economy can maintain its internal and external balances with a floating exchange rate regime. The macroeconomic performance under the floating exchange rates is analysed in the framework of internal shocks to it from govenment marcroeconomic policies, such as monetary policy (money supply changes) and fiscal policy (government spending changes). Namely, the developed application from a set of sample data shows that the overall effect of these two policies to the macroeconomic performance of the country is different. The monetary policy proved to be more effective under the floating exchange rate and it increased real domestic production when the money supply was increased. On the other hand, fiscal policy proved to be effective under the floating exchange rates only when capital mobility is low. With higher capital mobility, the fiscal policy tended to be less effective than the monetary policy. </p><img src="/view.aspx?si=121119/384814\f10ad4ab24fcc5bdb42df2c8d27b4676.gif" alt="Floating Exchange Rate and Internal Balance" align="left"/><p>This application examines how floating exchange rates affect the macroeconomic performance of an economy. In particular, it shows how an economy can maintain its internal and external balances with a floating exchange rate regime. The macroeconomic performance under the floating exchange rates is analysed in the framework of internal shocks to it from govenment marcroeconomic policies, such as monetary policy (money supply changes) and fiscal policy (government spending changes). Namely, the developed application from a set of sample data shows that the overall effect of these two policies to the macroeconomic performance of the country is different. The monetary policy proved to be more effective under the floating exchange rate and it increased real domestic production when the money supply was increased. On the other hand, fiscal policy proved to be effective under the floating exchange rates only when capital mobility is low. With higher capital mobility, the fiscal policy tended to be less effective than the monetary policy. </p>121119Sat, 04 Jun 2011 04:00:00 ZBekzod MakhmudovBekzod MakhmudovInternational Trade Model (Russian)
http://www.maplesoft.com/applications/view.aspx?SID=121009&ref=Feed
<p> The International trade model is designed to explain the model of international trade between two countries that trade between each other. The model helps to calculate the equilibrium points between the supply and demand both within the country and in the international market. In addition, the models in the application show the consumer and producer surplusses that occur as a result of international trade</p><img src="/view.aspx?si=121009/384601\003ce064b541e29917a2bdc40d2cc6c4.gif" alt="International Trade Model (Russian)" align="left"/><p> The International trade model is designed to explain the model of international trade between two countries that trade between each other. The model helps to calculate the equilibrium points between the supply and demand both within the country and in the international market. In addition, the models in the application show the consumer and producer surplusses that occur as a result of international trade</p>121009Thu, 02 Jun 2011 04:00:00 ZMaria KimMaria KimInternational Trade Model
http://www.maplesoft.com/applications/view.aspx?SID=120866&ref=Feed
<p>This application demonstrates how international trade occures in a simple case between two countries and in one product market. The application starts with given supply and demand functions in two separate countries, country A and country B. Then it proceeds to identify domestic equilibrium prices and quantities in these two countries for a given product market. The difference between the domestic prices plays a role in determining the direction of trade flows, i.e. exports and imports. In this given application, country A imports and country B exports products as the domestic price is lower in country B than in country A. Then the application shows how equilibrium international price and international quantity (exports and imports) can be identified given specific domestic supply and demand functions of the two countries. Moreover, this application also demonstrates interactively how setting import tariff and import quota in country A can restrict international trade and how this will affect import price, quantity, and welfare of economic agents in importing country. The application is created for study purposes of international trade model by using Maple program.</p><img src="/view.aspx?si=120866/384396\3d8359703bf9dcce1b49dfbc4fccfc5d.gif" alt="International Trade Model" align="left"/><p>This application demonstrates how international trade occures in a simple case between two countries and in one product market. The application starts with given supply and demand functions in two separate countries, country A and country B. Then it proceeds to identify domestic equilibrium prices and quantities in these two countries for a given product market. The difference between the domestic prices plays a role in determining the direction of trade flows, i.e. exports and imports. In this given application, country A imports and country B exports products as the domestic price is lower in country B than in country A. Then the application shows how equilibrium international price and international quantity (exports and imports) can be identified given specific domestic supply and demand functions of the two countries. Moreover, this application also demonstrates interactively how setting import tariff and import quota in country A can restrict international trade and how this will affect import price, quantity, and welfare of economic agents in importing country. The application is created for study purposes of international trade model by using Maple program.</p>120866Wed, 01 Jun 2011 04:00:00 ZSarvar RuzmatovSarvar RuzmatovAn Interactive Stock Quote Importer
http://www.maplesoft.com/applications/view.aspx?SID=103805&ref=Feed
Financial engineers and quantitative analysts often exploit network services to retrieve stock quotes. A large number of services exist, including paid-for real-time feeds from Bloomberg and Reuters. Yahoo, however, provide a free service that is delayed by fifteen minutes.
The Interactive Stock Quote Importer in this worksheet will import quotes (including historical data) from Yahoo for a series of user-specified NYSE stock symbols. This application
provides text fields for specifying up to five ticker symbols,
allows the user to pick those quantities they want to import with check boxes,
summarises the data in a table,
assigns the values to variables for further processing and analysis.<img src="/view.aspx?si=103805/thumb.jpg" alt="An Interactive Stock Quote Importer" align="left"/>Financial engineers and quantitative analysts often exploit network services to retrieve stock quotes. A large number of services exist, including paid-for real-time feeds from Bloomberg and Reuters. Yahoo, however, provide a free service that is delayed by fifteen minutes.
The Interactive Stock Quote Importer in this worksheet will import quotes (including historical data) from Yahoo for a series of user-specified NYSE stock symbols. This application
provides text fields for specifying up to five ticker symbols,
allows the user to pick those quantities they want to import with check boxes,
summarises the data in a table,
assigns the values to variables for further processing and analysis.103805Wed, 06 Apr 2011 04:00:00 ZMaplesoftMaplesoftFinancial Modeling in Maple
http://www.maplesoft.com/applications/view.aspx?SID=103793&ref=Feed
The Finance package is new in Maple 15. It contains many tools for advanced financial modeling, as well as accessible tools for personal finance. On the personal finance side, there are tools that can be used for computing with mortgages or retirement packages. The financial modeling tools include a wide range of stochastic processes that can be used to model option prices, such as Brownian motion, Ito processes, an SVJJ process, and more. It also includes tools to compose complex processes out of these building blocks. You can also create, manipulate, and analyze many types of financial instruments, such as American, Bermudan, and European options and swaptions and several types of bonds; short rate models; term structures of interest rates; and cash flows. The instruments can then be priced using analytic methods, lattice methods or Monte Carlo simulation - all using one of many date arithmetic conventions. Finally, the processes occurring in the package can be visualized in several ways.<img src="/view.aspx?si=103793/thumb.jpg" alt="Financial Modeling in Maple" align="left"/>The Finance package is new in Maple 15. It contains many tools for advanced financial modeling, as well as accessible tools for personal finance. On the personal finance side, there are tools that can be used for computing with mortgages or retirement packages. The financial modeling tools include a wide range of stochastic processes that can be used to model option prices, such as Brownian motion, Ito processes, an SVJJ process, and more. It also includes tools to compose complex processes out of these building blocks. You can also create, manipulate, and analyze many types of financial instruments, such as American, Bermudan, and European options and swaptions and several types of bonds; short rate models; term structures of interest rates; and cash flows. The instruments can then be priced using analytic methods, lattice methods or Monte Carlo simulation - all using one of many date arithmetic conventions. Finally, the processes occurring in the package can be visualized in several ways.103793Wed, 06 Apr 2011 04:00:00 ZMaplesoftMaplesoftPortfolio Simulation and Quadratic Programming
http://www.maplesoft.com/applications/view.aspx?SID=100604&ref=Feed
<p>We will in this maple worksheet explore portfolio theory and quadratic optimization.<br />We will start by simulating some data for 50 stocks and then optimize the portfolio.<br />We will also use empirical data to backtest our portfolio strategy.</p><img src="/view.aspx?si=100604/maple_icon.jpg" alt="Portfolio Simulation and Quadratic Programming" align="left"/><p>We will in this maple worksheet explore portfolio theory and quadratic optimization.<br />We will start by simulating some data for 50 stocks and then optimize the portfolio.<br />We will also use empirical data to backtest our portfolio strategy.</p>100604Mon, 03 Jan 2011 05:00:00 ZMarcus DavidssonMarcus DavidssonThe Knapsack Problem
http://www.maplesoft.com/applications/view.aspx?SID=100353&ref=Feed
<p>This maple worksheet will explore the 0/1 knapsack problem <br />which is a famous problem in combinatorial optimization. <br />We will solve the problem by using dynamic programming. <br />We will then confirm such a solution graphically by using <br />Maples combinat() package.</p><img src="/view.aspx?si=100353/maple_icon.jpg" alt="The Knapsack Problem" align="left"/><p>This maple worksheet will explore the 0/1 knapsack problem <br />which is a famous problem in combinatorial optimization. <br />We will solve the problem by using dynamic programming. <br />We will then confirm such a solution graphically by using <br />Maples combinat() package.</p>100353Mon, 20 Dec 2010 05:00:00 ZMarcus DavidssonMarcus DavidssonOptimal Stopping - Take Two
http://www.maplesoft.com/applications/view.aspx?SID=99621&ref=Feed
<p>This application will discuss optimal stopping both<br />when we maximize the expected value recursively <br />and when we maximize the probability of success <br />i.e. the secretary problem</p><img src="/view.aspx?si=99621/maple_icon.jpg" alt="Optimal Stopping - Take Two" align="left"/><p>This application will discuss optimal stopping both<br />when we maximize the expected value recursively <br />and when we maximize the probability of success <br />i.e. the secretary problem</p>99621Tue, 30 Nov 2010 05:00:00 ZMarcus DavidssonMarcus DavidssonUniversal Portfolio
http://www.maplesoft.com/applications/view.aspx?SID=97487&ref=Feed
<p>The reason why I started to get interested in this universal <br />portfolio stuff was because of Brian Chen's paper <em>Review </em><br /><em>of Universal Portfolios with Side Information</em> where he writes:<br /><br />"A key insight in the development of these universal <br />portfolios is that the average of a set of exponentials <br />grows exponentially as fast as the largest exponential"<br /><br />The purpose of this worksheet is to test if this is true.</p><img src="/view.aspx?si=97487/maple_icon.jpg" alt="Universal Portfolio" align="left"/><p>The reason why I started to get interested in this universal <br />portfolio stuff was because of Brian Chen's paper <em>Review </em><br /><em>of Universal Portfolios with Side Information</em> where he writes:<br /><br />"A key insight in the development of these universal <br />portfolios is that the average of a set of exponentials <br />grows exponentially as fast as the largest exponential"<br /><br />The purpose of this worksheet is to test if this is true.</p>97487Tue, 05 Oct 2010 04:00:00 ZMarcus DavidssonMarcus DavidssonOptimal Stopping Theorem
http://www.maplesoft.com/applications/view.aspx?SID=97244&ref=Feed
<p>I will in this Maple worksheet try to explore the <br />optimal stopping concepts introduced by: <br /><br />Bruss, T (2000) Sum the Odds to One and Stop, <br /><em>The Annals of Probability</em>, Vol 28, No 3, pp 1394 -1391 <br /><br />One important question that we will answer is : <br />How many times do we need to roll a dice if we want <br />to maximize the probability of finding one six?</p><img src="/view.aspx?si=97244/maple_icon.jpg" alt="Optimal Stopping Theorem" align="left"/><p>I will in this Maple worksheet try to explore the <br />optimal stopping concepts introduced by: <br /><br />Bruss, T (2000) Sum the Odds to One and Stop, <br /><em>The Annals of Probability</em>, Vol 28, No 3, pp 1394 -1391 <br /><br />One important question that we will answer is : <br />How many times do we need to roll a dice if we want <br />to maximize the probability of finding one six?</p>97244Tue, 28 Sep 2010 04:00:00 ZMarcus DavidssonMarcus DavidssonVaR and Portfolio Rebalancing
http://www.maplesoft.com/applications/view.aspx?SID=96564&ref=Feed
<p>I will in this worksheet first of all show that a <br />portfolio's VaR is a function of the portfolio <br />variance but also the portfolio expected return.<br /><br />I will then show that a simple diversified <br />50% bond and 50% momentum strategy can<br /> explains a lot of the portfolio returns. <br />The universe consists of 23 global stockmarket<br /> indicies.<br /><br />Such universe is very small but it still manage<br /> to produce attractive returns which is good <br />news for a disciplined small time investor.</p><img src="/applications/images/app_image_blank_lg.jpg" alt="VaR and Portfolio Rebalancing" align="left"/><p>I will in this worksheet first of all show that a <br />portfolio's VaR is a function of the portfolio <br />variance but also the portfolio expected return.<br /><br />I will then show that a simple diversified <br />50% bond and 50% momentum strategy can<br /> explains a lot of the portfolio returns. <br />The universe consists of 23 global stockmarket<br /> indicies.<br /><br />Such universe is very small but it still manage<br /> to produce attractive returns which is good <br />news for a disciplined small time investor.</p>96564Wed, 01 Sep 2010 04:00:00 ZMarcus DavidssonMarcus DavidssonPicking the Largest Number
http://www.maplesoft.com/applications/view.aspx?SID=95033&ref=Feed
<p>In 1987 Thomas M. Cover introduced what is known as the z-strategy. <br />Such a strategy can be used to gain an advantage in a stochastic<br />game where the goal is to select the largest number. I will in this<br />Maple worksheet explore such a z-strategy in more detail. </p><img src="/view.aspx?si=95033/278030\e67a15175fbfa4b2034efdc8efeb3752.gif" alt="Picking the Largest Number" align="left"/><p>In 1987 Thomas M. Cover introduced what is known as the z-strategy. <br />Such a strategy can be used to gain an advantage in a stochastic<br />game where the goal is to select the largest number. I will in this<br />Maple worksheet explore such a z-strategy in more detail. </p>95033Tue, 13 Jul 2010 04:00:00 ZMarcus DavidssonMarcus Davidsson