Sie sind auf Seite 1von 2

c 




c  :

For each question, please make assumptions and state them as comments in the header of the
source.

Q1) Matlab / C++/ C or any other language the candidate is comfortable with (except VBA in excel)

The attached excel file contains daily data for INR USD currency pair, with the following definition:

- column 1 contains the date in reverse chronological order, in excel format, for the last 465 business
days.
- column 2 contains the close for the day
- column 3 contains the open for the day
- column 4 contains the high for the day
- column 5 contains the low for the day.

A) Write a function which gives the dates on which 'n' consecutive down days have happened (say
function consecutive_down_days(n), returns vector containing dates) . A down day is defined as a
day on which open>close. Write another function to find the maximum value for 'n' where
size(consecutive_down_days(n))>0.

B) Write a function to determine dates on which the closing price> 'p' percentile of the closing prices
of the previous 'n' days. For example, percentile_days(.75,10) would return vector of dates where
each date has a closing price greater than 75 percentile of the closing prices of the last 10 days.

C) Generate piecewise smooth curves for the closing data, where each piece should contain more
than one closing day. Select an algorithm to decide on the number of days in each piece. Please do
not select a constant number of days strategy, i.e each piece contains a fixed number of days.

D) Find local maxima and minima for each curve, generating a set of local minimas and maximas for
the entire data set.

E) Determine regression lines through the minima set. Again select an algorithm to decide how many
adjacent minima points must be taken for each regression line.

F) Plot closing prices, curves and regression lines as generated above.

Q2) Excel

The attached excel contains the same data as in the matlab file.

A) Generate a 10 bar histogram on the daily range. (daily range = absolute_value(open-close))

B) Calculate annualized volatility of the closing price (please feel free to refer to any text book/search
on the internet for definition of volatility).

C) Using normal distribution, calculate the 95%, 99% probability intervals (assuming downside
probability is same as upside).
D) Determine which set of 10 consecutive days has the widest and narrowest 95% confidence
interval.

E) Write a VBA function to implement D) above. The function should return the first date of the date
set where the set of 'n' consecutive days has the widest 'p' confidence interval.

Q3) Your views on - ³One cannot manage what one cannot measure ´ (max 300 words including
measures, if any)

Das könnte Ihnen auch gefallen