Maxprof3.cpp Position.h
For convenience, it is best to complete the development of the three individual algorithms with the program in the file maxprof3.cpp, which uses all of them. include lt iostream gt include lt iomanip gt include lt string gt include lt cmath gt using namespace std include Prices.h include PotentialProfitAlg.h include ProfitAndLossAlg.h include FirstPLReserveAlg.h include SecondPLReserveAlg.h using namespace PPBOOK cin gt gt market gt gt nContracts gt gt imargin gt gt mmargin gt costs double...
Example Testlcpp
From time to time I shall apply the C typedef specifier. It helps to create a new identifier for naming already existing types. This does not introduce new classes but alias names making the code shorter and more readable. The program testl.cpp containing a few typedef and C main function is include lt vector gt include lt iostream gt using namespace std include Spec.h include Price.h using namespace PPBOOK typedef Price lt SpecGC gt GoldPrice typedef typedef typedef GoldPrices gp gp.push_back...
The Program Computing Pardos Potential Profit
It is convenient to have a program that works as a filter with the following interface on Microsoft Windows type prices.txt I pardo or on UNIX it might look like cat prices.txt I pardo in both cases the same effect is reached using the syntax pardo lt prices.txt . Both programs, type on Windows and cat on UNIX, send the contents of text files to the standard output. A filter program takes information from standard input, processes it, and sends the result to the standard output. The pipe syntax...
Simple Algorithm for a True Reverse System
Robert Pardo Pardo 1992 formulated a definition of potential profit and an algorithm of its computation in this statement Potential profit is the profit that could be realized by buying every bottom and selling every top. More precisely, it is the sum of every price change where each change is taken as a positive number. Are the first and second sentences in agreement Yes, they are if we assume that selling every top means short selling so that the result of this transaction is a net short...
Acknowledgments
Indeed, I have written this book in a home laboratory for my own enjoyment but always feeling that the subject goes beyond the interests of one individual. Nevertheless, a subject or a man cannot be taken out of his life context. If someone in July 1992 had told me that a Russian scientist doing research on inductively coupled plasma combined with mass spectrometry and chromatography under the guidance of Professor Masatoshi Morita of the National Institute for Environmental Studies would ever...