Analysis of Financial Time Series: USD/EGP Exchange Price
The daily USD/EGP exchange prices R are available over the period from December 1, 2016
to April 21, 2017 in the file : “[login to view URL]” . Assuming that the average exchange price over
the given period is M, a change Ci in a given day (i) is positive when the price rises over M,
and it is negative when it drops below that average.
From the given data set, we need to find the dates of each of the N most positive changes (e.g.
N = 10) as they represent the N highest exchange prices over the whole data set. Likewise, we
need to find the dates of each of the N most negative changes (e.g. N = 10) as they represent
the N lowest exchange prices over the whole data set.
This problem can be solved using Priority Queues where each item is composed of 2 elements:
the date and the exchange price change from the average. Priority here is for the price change.
We also need to find the start date and the end date of the contiguous period over which the
sum of price changes C is maximum.
This problem is called the Maximum Subsequence Problem. The problem statement is as
Given a sequence of n values (possibly negative), C0, C1, ..., Cn-1, find the values of the indices
(i,j) that maximize the value of the sum
(This is zero if all values are negative).
Example: Suppose the changes in price are: - 0.2, 1.1, - 0.4, 1.3, - 0.5, - 0.2
Smax = C1 + C2 + C3 = 2.0 (hence i = 1 and j = 3)
1. Implement the PQ class.
2. Find the N highest and N lowest exchange rate days over the whole data set (e.g. N =
3. Implement the Maximum Subsequence Algorithm and find the start and end days of
the contiguous period over which the sum of price changes is maximum.
11 freelancer đang chào giá trung bình ₹1677 cho công việc này
Hello We are highly motivated young technocrats from India. We are approachable, you can come to us if you have a struggle, we are happy to help. Team TiponTongue
Dear sir, I have read your requirement.I have been programming c++ for 2 years.I can do your task quickly and in skilfull way. let me do your task Waiting for your reply Regards