Assignment Super Simple Stocks
Requirements
1. Provide working source code that will :-
a. For a given stock,
i. calculate the dividend yield
ii. calculate the P/E Ratio
iii. record a trade, with timestamp, quantity of shares, buy or sell indicator and
price
iv. Calculate Stock Price based on trades recorded in past 15 minutes
b. Calculate the GBCE All Share Index using the geometric mean of prices for all stocks
Constraints & Notes
1. Written in one of these languages:
Java, C#, C++, Python
2. No database or GUI is required, all data need only be held in memory
3. Formulas and data provided are simplified representations for the purpose of this exercise
Table1. Sample data from the Global Beverage Corporation Exchange
Stock Type Last Fixed Par Value
Symbol Dividend Dividend
TEA Common 0 100
POP Common 8 100
ALE Common 23 60
GIN Preferred 8 2% 100
JOE Common 13 250
All number values in pennies
Table 2. Formula
Common Preferred
Dividend Yield .
P/E Ratio
Geometric Mean
1 2 3
Stock Price