0% found this document useful (0 votes)
178 views1 page

Stock Calculation Assignment Guide

The document provides requirements for a stock market program including: 1) Calculating dividend yield and P/E ratio for a given stock. 2) Recording trades with timestamps, quantities, and buy/sell indicators and prices. 3) Calculating stock prices based on past 15 minutes of trades. 4) Calculating the GBCE All Share Index using the geometric mean of prices for all stocks. The program must be written in Java, C#, C++, or Python and does not require a database or GUI. Sample stock data and formulas are provided.

Uploaded by

Nilesh Chaudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
178 views1 page

Stock Calculation Assignment Guide

The document provides requirements for a stock market program including: 1) Calculating dividend yield and P/E ratio for a given stock. 2) Recording trades with timestamps, quantities, and buy/sell indicators and prices. 3) Calculating stock prices based on past 15 minutes of trades. 4) Calculating the GBCE All Share Index using the geometric mean of prices for all stocks. The program must be written in Java, C#, C++, or Python and does not require a database or GUI. Sample stock data and formulas are provided.

Uploaded by

Nilesh Chaudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

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

You might also like