Outline of the Paper The paper will cover the theoretical background of the algorithm I will implement for the coding part of the project. The paper will consist of four things. First, three fundamental concepts will be introduced. They are Online Algorithms, Competitive Analysis of Online Algorithms and the One-Way Trading Problem. Secondly, and also the technical highlight of the paper is an evolutional analysis on the model being implemented. Four stages of development will be distinguished. The simplest model is P*=sqrt(M*m). The next stage involves randomization. The third step sees models based on more delicate rules called threat-based algorithms. Finally, the model is further improved by introducing the flexibility of risk management. Third, a few words will be said on the implementation process. In this section, the technical issues regarding the implementation will be examined. This includes the nature of the data used, how truthful the application is to the theoretical model and how the application can be used. The last part of the paper will stretch out to the real world. I will talk a little about the economics of trading, things like the determinants of the trade volume, etc., which leads us to conclude how the application might fit in the decision-making process in the real world.