Optimizing financial portfolios is both mission and time critical and the user does not have the luxury of waiting for the application to churn out data over long time periods. The modern portfolio optimization techniques use historical prices as the basis to compute risk and returns. This method of optimization uses voluminous data and it is also compute intensive as it needs to find the most optimal investment portfolio configuration in a given vector. The problem is further compounded when the investment time horizon or the portfolio size increases.
To address this issue, the team at Protegesoft used two simple approaches: (1) cache critical secondary data in memory through data structures and (2) to hyper-thread sections of codes to improve processing time.
Both Intel and HP offer many tools to optimize code for Itanium based servers on their native compilers. On the other hand, there are fewer options available for .NET based applications. The key thing to remember is that Itanium is a 64bit architecture allowing applications to access in excess of 4MB of memory. .NET framework permits hyper-threading which is Microsoft’s implementation of parallelism. Hyper-threading works both on Xeon and Itanium chipsets.
The way to attaining optimal application performance is first to ascertain the objective of the program. In our case, we were looking for optimal portfolio configuration in a given vector. Linear algorithms were too time-consuming as it performs an exhaustive search. Quadratic and logarithmic algorithms offer much faster solutions to the problem.
Back to basics
Visual Studio is an excellent RAD (Rapid Application Development) environment. However, typical .NET applications are closely coupled with the database. At Protegesoft, we departed from the norm to encapsulate business and other financial portfolio functions in class libraries. Caching was also used extensively to reduce the incidence of select statements from databases. In order to cache the data in memory, we used data structures to store critical secondary data that was frequently accessed to speed up fetch operations. This improved performance of the application dramatically.
Second, we optimized frequently used portions of code. This also meant that dead code was removed and we also checked the efficiency of inner and outer loop. In some cases, a ‘Parallel For’ was used instead of a normal ‘for’ loop.
There are also other optimizing techniques discussed for mission critical applications. For more information:
Introduction to Microarchitectural Optimization for Itanium® 2 Processors:
http://cache-www.intel.com/cd/00/00/21/93/219348_software_optimization.pdf
Optimizing Itanium Based Applications
http://h21007.www2.hp.com/portal/download/files/unprot/Itanium/OptimizingApps-ItaniumV9-1.pdf
protegesoft
No comments:
Post a Comment
Please do not flame or use profanities in your comments.