Showing posts with label Finance. Show all posts
Showing posts with label Finance. Show all posts

Thursday, 21 March 2013

Morgan Stanley QED: Round1

Morgan Stanley organized a contest Q.E.D in 2012 to promote Mathematics in Finance among the students of IITB. It kicked off with a talk on Quantitative Finance by Ashwin Rao (Managing Director, Morgan Stanley India). For the contest, there were 3 elimination rounds. Round #1 had the following questions.


Objective Section

1) Let P be a projection, so P*P = P. Compute inverse of (I - cP) given c = 1/2, where I is the identity matrix.

2) Two creepers, C1 and C2, are both climbing up and round a cylinder. C1 twists clockwise and C2 anticlockwise, both start at the same point at the bottom. Before they reach the top of the cylinder C1 had made 5 complete twists and C2 had made 3 complete twists. Not counting the bottom and the top, how many times do their paths intersect?

3) Compute Σ ( i^5 / 1000^6 ) over i = 1 to 1000, approximately.

4) For strings of length m + n, with m 0's and n 1's. Find the expected number of switches from 0 to 1 (a switch can be thought of as presence of '01' in the given string).

5) Compute  ∫ (dt)^2.

6) Let I be an n*n identity matrix and J be an n*n matrix of all ones. Find the rank of I - (1/n)J.



Subjective Section

1) You have N cars that are all travelling the same direction on an infinitely long one-way highway. Unfortunately, they are all going different speeds, and cannot pass each other. Eventually the cars will clump up in one or more traffic jams. In terms of N, what is the expected number of clumps of cars?

2) Say a[1], a[2], a[3], ... a[N] be a permutation of first N natural numbers. a[i] is a maxima if a[i-1] < a[i] > a[i+1]. Find E[ number of maximas in a random permutation ].

3) Prove that E[x] = ∫ (1 - F(x)) dx over the range [0, ], where F is the cumulative distribution function.

Wednesday, 27 February 2013

Morgan Stanley Quant Test

Morgan Stanley took a test for it's Quantitative Analyst profile. The test had 2 sections "Easy" and "Difficult" and total duration was about 2.5 hours.


Easy

1) Prove no square matrices A, B exists such that AB-BA = I. (Hint: use trace(X))

2) Each amoeba my transform to 0 amoeba (means that it's dead), 1 amoeba (stays itself) or 2 amoebas (reproduces a child). We initially have 1 amoeba. Find probability of the process up with 0 amoeba in the end.

3) Consider all strings composed of of {0, 1, 2}. Find number of strings such that no two 1s are consecutive in the string.

4) Given X, Y are Uniform(0,1) random variables. Find distribution of X^2 + Y^2.

5) Write algorithm to find lowest common ancestor of 2 nodes in a binary tree.

6) Solve the recurrence f(a, b) = f(a, b-1) + f(a-1, b-1) with base cases
    f(0, 0) = 1,
    f(0, k) = 0,
    f(k, 0) = 1. (Hint: Did you observe it's a Pascal Identity)



Difficult

1) Give an algorithm to find longest alternating subsequence in an array of numbers. The sequence need not be continuous. Alternating means that 1st term is greater than 2nd term, 2nd term is smaller than 3rd term and so on OR 1st term is smaller than 2nd term, 2nd term is greater than 3rd term and so on.

2) You are given a stream of numbers. Give an efficient data structure to find median of the numbers read so far from the stream in O(1) time.

3) You are given w white balls and b black balls initially in a box. Each time we randomly draw a ball from the box and remove it.We continue until no white ball is left in the box. Find the expected number of black balls in the box in the end.

4) Give a method to randomly choose any K-size subset from an N-size subset, however, N is not known to you.

5) Find all functions f, such that f(mA+nB) = mf(A) + nf(B), f(AB) = f(BA), where A, B are square matrices, find f in terms of a matrix M.

Monday, 11 February 2013

Breaking Into Wallstreet: Finance Interviews Prep

In this post, I will be focusing on preparation tips for Analyst-level finance jobs at major investment banks and other finance corporations. It's based on my experience with finance firms that recruited at IITB in 2012; so this post will make more sense for finance-enthusiasts at the IITs.

This post will not be focusing on Quant-finance profiles. If you need some fundae for preparing for Quant finance interviews, checkout Cracking Quant-Finance Interviews.


Integrating the following in your placement preparation routine should ideally help improve your chances of getting a finance job


Start reading a Financial daily
If you really want a financial markets role, you should know what's happening in the financial world and know it well. You should be able to answer questions based on important events that occurred in the financial markets over the recent years. For example, you might be asked 'Why did the 2008 crash occurred?', 'Tell me about what you think of Euro-zone crisis', 'What is Quantitative easing?' and so on. Reading financial news daily would help you answer above kind of questions. I suggest at least one of the following regularly:
  • The Economic Times: Focused on Indian markets. Highly recommended.
  • The Economist: It publishes some excellent finance and economics-oriented articles with interesting analysis and statistics. Recommended for those who absolutely love Economics.
  • Bloomberg/Reuters: Focused primarily on US and European markets. Read them once in a while to get an idea about stuff going on globally.


Getting your Finance concepts 'Right'
Do you know what are derivatives are? What about options? If these terms sound greek to you, I suggest reading them up from the following sources.
  • Investopedia: This is the wikipedia of finance. Read up the beginner's tutorials. Subscribe to Investopedia's daily word.
  • Vault Guide to Finance Interviews: This is an awesome handbook that gives introduction to almost all topics in finance starting from stocks & bonds to currency & interest rates. 
  • Vault Guide to Investment Banking: This one somewhat digs deeper into Investment Banking roles of Sales, Trading and Research and topics like Corporate Finance.


Financial Certifications 
  • Although certifications like CFA and FRM are way too expensive (at least by Indian standards, especially after the Rupee has eroded in comparison to Dollar), clearing them would put you in the favorites-list of recruiters. Also, they demonstrate interest and dedication that you have towards the field of Finance, thus giving you an extra cut over others in the competition. 
  • You can also pursue NCFM certification (National Stock Exchange's certification in financial markets)  for various finance modules.


Finance related Coursework 
  • Show-off some course-work in subjects related to Finance and Economics. You should try out Finance/Economics related courses running in your institute. 
  • You can pursue some from tons of Finance and Economics courses on Coursera like Game Theory, Introduction to Finance, Economics for Scientists etc. Here is the comprehensive list.


Internship in Finance
This is kind of mandatory. So try to get an internship in some role related to Financial markets if you are really interested in a long-term career in finance. 


CAT Practice
Give some mock CAT tests even if you are not going to appear for CAT. Most of the finance companies use aptitude test based shortlisting procedure and practice will help you get in the final interview shortlist. Practice Quantitative Aptitude and Data Interpretation sections from the CAT mocks, it will really help you do good on the tests.

Miscellaneous Websites I found the following websites to be great in terms of getting to know the Finance Industry and other interview tips. Do read them to know more. You can also ask your related doubts on the forums of some of these websites.


Firms that offer Financial Analyst profiles (IITB Placements, 2012)
  • Tier1: Deutsche Bank, JP Morgan, CitiGlobal, Credit Suisse, Optiver, American Express
  • Tier2: Capital One, Crisil, Finmechanics, Forefront Capital, FinIQ, Blufin, RAK Holdings

Tuesday, 5 February 2013

Credit Suisse: Quantitative Math Test

Following questions were asked for Strategic Risk Management profile of Credit Suisse at IIT-Bombay.



1) Value of E[|X|] where X ~ Normal(0,1)

2) Choose 3 points on circumference of a circle. What is the probability that the center will lie in the triangle?

3) There are 2 men who want to meet between 5pm and 6pm. Assuming arrival time is uniform and random, calculate the probability that 2nd arriving person has to wait less than 10 mins

4) What is the expected number of tosses needed to get 2 consecutive heads?

5) You are given a 6-sided fair die. Calculate expected number of throws of dice to see all the faces (values 1,2...6) at least once.

6) Solve: dy/dx + xy = x*(y^2)

7) Solve: dy/dx + 3y = e^x

8) Calculate Sum(Var(pow(Xi,2))), i = 1 to N, Xi are independent.

9) Calculate Var(XY) where X ~ Uniform(0,1) and Y ~ Normal(0,1)

10) There are 3 bulbs in a room. If we switched on all of them. What is the total expected time till the room remains lit? Assume the "on" time for each bulb is an exponential random variable with λ=1 hour.

11) There are N coins. Probability of kth coin to land up a head is 1/(2k+1). We toss all the N coins, calculate the probability that we get odd number of heads.

12) Dart thrown land up uniformly and random at a distance from centre of a unit circle. Distance from center is in the range [0,1]. One who lands up farther from the center loses and the loser pays amount equal to distance from the centre. What is the expected pay?

13) Calculate E[f(x)], where x ~ N(0,1) (For some function f).

14) Given X ~ Uniform(-π/2, π/2). Find probability distribution of Y = tan(X).

15) f(x,y) = (x^2 - y^2) / (x^2 + y^2). Comment on continuity of the function at (0,0)

16) We do M trials. In each trial the result is a uniform RV in [0,1]. What is the minimum no of tosses needed to be 90% sure of getting a value in range [0.8, 0.9].

Wednesday, 16 January 2013

Optiver Math Test: Subjective Questions


I have posted the subjective questions asked in Optiver's written test below. Do check out Optiver Objective Questions for objective questions asked in the test. Also, if you need more information on Optiver and it's selection procedure check About Optiver.

1) After a snail racing contest, the four contestants were congratulating each other. Only one snail wore the same number as the position it finished in. Alfred's snail wasn't painted yellow nor blue, and the snail who wore 3, which was painted red, beat the snail who came in third. Arthur's snail beat Anne's snail, whereas Alice's snail beat the snail who wore 1. The snail painted green, Alice's, came second and the snail painted blue wore number 4. Anne's nail wore number 1. Can you work out who's snail finished where, it's number and the colour it was painted?

2) At a certain time between 3pm and 4pm, the hour and the minute hands are at equal angles from the 6 mark, what time will it be exactly?

3) I lived in a city that held as much as it could,
    So I moved to another that repaid what what it should.
    The third had very little, with not much to be found,
    The fourth was very boring, with no change in the sound.
    The fifth was so foggy you could not see past the next face.
    The sixth was on the move; I could barely keep up the pace,
    The seventh was strange; bizzare character would people attain,
    So I settled in the eighth, because it was so plain. 
    What are the various cities?

4) Five youngsters entered a contest to guess how many marbles were in a bowl. Alice guessed 45, Betty guessed 39, Chuck guessed 49, Dan guessed 50, and Ed guessed 47. One was off by 6, one by 5, one by 2, and one by 4. One was right. Who was right?

5) A sheet of paper has statements numbered from 1 to 100. For each N, 1<=N<=100, Statement N says, "Exactly N of the statements in this sheet are false". Which statements are true?

6) You have normal 6-sided cube. I give you 6 different colors that you can paint each side of the cube with (one color to each side). How many different cubes can you make?

Monday, 14 January 2013

Optiver Math Test: Objective Questions


These are the questions asked in Optiver's Subjective Test. Do check Optiver's selection procedure for more information about shortlisting process of Optiver at IIT-Bombay.


1) What number comes next in this series: 1 11 21 1211 111221 312211 13112221 ?
  • 12113331
  • 1113213211
  • 13221113
  • 113211321
2) The following equation is wrong: 103 - 102 = 3. Move one numeral to make it correct. The numeral moved is ?
  • 0
  • 1
  • 2
  • 3
3) Imagine a 3*3*3 cube. How many cuts do we need to break it into 27 1*1*1 cubes ? (A cut may go through multiple pieces)
  • 27
  • 9
  • 18
  • 6
4) In a deck of 52 cards, what is the least number of cards you must take to be *guaranteed* at least one four-of-a-kind (eg: 4 queens) ?
  • 4
  • 16
  • 28
  • 40
5) Can you arrange the numerals 1 to 9 (1, 2, 3, 4, 5, 6, 7, 8 and 9) in a single fraction that equals 1/3 ? Example that doesn't work 7192/38456 = 0.187. The last 2 digits of the numerator of the above fraction are 
  • 58
  • 32
  • 61
  • 59
6) 5 pirates of different ages have a treasure of 50 gold coins. On their ship, they decide to split the coins using this scheme: The oldest pirate proposes how to share the coins, all of them will then vote for or against it. If 50% or more of the pirates vote for it, then the coins will be shared that way. Otherwise, the pirate proposing the scheme will be thrown overboard, and the process is repeated with the pirates that remain. Assuming that all 5 pirates are intelligent, rational, greedy and do not wish to die, how much will the 2nd youngest pirate get ?
  • 97
  • 98
  • 0
  • 20

I have posted the subjective section of the paper here.

Wednesday, 2 January 2013

Cracking Quant-Finance Interviews

Quantitative finance or Mathematical finance is one of the most lucrative (read high-paying) job profiles offered at IITs. This post is meant to be useful to people who are targeting quant-finance jobs. Below post is based on my experience at IIT-Bombay's placements, but I think it will be useful to everyone in general.



What is Quantitative Finance ?
Naively speaking, it involves using mathematical models for profit maximization and risk minimization in financial markets. The word quantitative is used because instead of qualitatively ranking assets, you try to figure out actual numbers and hence make good decisions and thus great profits. Quants generally code up mathematical models. Thus extensive knowledge of Computer Science is needed.

Example: One example is Algorithmic Trading. In naive terms, you give the computer a set of conditions and if some condition holds true, you execute some trades (buy or sell orders).
  • Since you have a huge amount of market data about different assets available every second, you need to be able to store and retrieve the data efficiently. Knowledge of Databases helps us in managing the data efficiently.
  • Also sometimes, the profit-making conditions may hold true only for a fraction of a second and your hardware and software developed should be very fast so as to execute the trades within that fraction of the second. Thus your systems must be time-optimized at hardware and software levels. Knowledge in Algorithm Design, Compilers and Networks helps us tackle this problem.
Here is a presentation that Mr. Ashwin Rao (MD, Morgan Stanley India) gave on Quantitative Finance; it might give you more perspective.


Why Quantitative Finance ?
  • You might want to work as a quant simply because you love Mathematics and want to see it's application in the real-world financial markets.
  • Quants get paid truck-loads of money! This is because they help make Wallstreet banks and hedge-funds make huge profits. So money is a factor that might excite you to work as a quant. 
  • But, one thing to be noted is that the work hours are on the heavier side. So it turns out to be "more work for more money" policy. Yet the pay-per-hour ratio is well above other kinds of job profiles.
  • Also there are performance related bonuses and believe me, the bonuses can be as much as your base salary or even more. This is where the finance sector beats all other sectors, in general.


What are the skills needed for Quant Finance Jobs ?
  • CS major students have an edge over others for this profile. This is because of application of various CS based concepts on the job. Knowledge about Data Structures & Algorithms is essential.
  • You are expected to have a solid programming background in C/C++ or Java.
  • Generally you are not expected to have any prior knowledge/experience in finance.
  • Solid background in Math topics like Probability Theory, Linear Algebra and Calculus.


How to do well on Quant Interviews/Tests ?
You need to be very good in Probability theory, Combinatorics and general Math topics like Linear Algebra and Calculus. Also having idea about Data Structures and Algorithms is essential. I recommend reading/practicing from the following resources:

Probability / Combinatorics / Math:
Data Structures and Algorithms:
  • Introduction To Algorithms - By Cormen : If you have no idea about Data Structures and Algorithms, this book is an absolute must. It's considered to be a bible for Algorithms.
  • Algorithms For Interviews : This book has a huge number of algorithmic puzzles classified as per different algorithm design paradigms. I recommend practicing from it if you have time.
Puzzle Blogs:

Also, I will be posting questions asked by various quant firms that appeared at IITB's 2012 placements. I suggest you to keep checking my blog from time to time.


Which kind of firms offer Quant Finance jobs ?
Generally investment banks and hedge-funds. Some recruiters at IIT-Bombay offering quant-finance profiles:
  • Hedge Funds: WorldQuant, Tower Research Capital
  • Investment Banks: Goldman Sachs, Morgan Stanley, Deutsche Bank, CitiGroup, Credit Suisse

Saturday, 29 December 2012

Goldman Sachs Test



Goldman Sachs test for "Quant Strategist" position was one of the lengthiest test I have given till date.

400+ students appeared for the test out of which around 25 students were shortlisted for final rounds of interviews.

Test was for a total of 3.5 hours. I don't remember many questions, but here are a few :



Section 1 : (Probability + Linear Algebra, Subjective)

1) Two points are chosen randomly in a unit square. What is the probability that the circle formed using the diameter of the 2 points contains the square's center ?

2) Choose any 9 points on or within a unit square. Prove that there always exists 3 points such that triangle formed by them has area 1/3.

3) Find Eigen values of a matrix which has all entries equal to 1, except the diagonal entries.

4) Prove : Summation(k * p(n,k)) = n! over k=1 to n, where p(n,k) is the number of permutations of {1,2, .. n} which have exactly k fixed points.


Section 2 : (Algorithms + Probability, Subjective)

1) Given 2 integers a, b. Calculate probability that a^2 + b^2 is divisible by 10.

2) Given a number N, find the smallest palindrome number greater than N in O(lgN)

3) Check whether we can form N/2 pairs from an array of length N, such that each pair's sum is divisible by k.


Section 3 : (Computer Science Concepts, Subjective + Objective)

The 3rd paper tested our knowledge on core cs concepts. It mainly consisted of questions on Networks.


Saturday, 8 December 2012

Optiver Tests: Some Tips

Optiver is a market-making firm. Market-maker is basically a financial institution which quotes both a buy-price and a sell-price for different financial instruments. Thus, they are an important source of liquidity in the market and they make profit by the price differences in sell and buy quotes.

Optiver has been hiring a good number of students from IIT-Bombay for the last 2 years. It has become one of the most craved firms here at IIT-B, purely because of the job location, the lucrative package it offers, and also the kind of work it does. It has primarily hired for it's headquarters in Amsterdam, but it might hire for it's offices in Chicago and Sydney too.

Optiver has a very rigorous testing and interviewing process. It takes 3 written tests, and after every test it scalps approximately 50% of the students.

Shortlisting for the test is based on your Resume and CPI. Around 50% students are shortlisted for the test out of the total students who applied.

Test #1 : Speed Arithmetic (80 questions, 8 minutes, MCQ)

This is a pen-and-paper 8 minute arithmetic test! Yes you heard it right, it's only for 8 minutes. That's the beauty of it, in 8 minutes, it gets decided whether you are eligible for Optiver or not. It's a arithmetic speed-test and contains 80 simple arithmetic questions and you need to get around 60 right to clear this round. I recommend TraderTest for improving your chances.

1) The questions are very easy and based on + - * / only. Mostly integers.
2) Time taking questions are the ones involving fractions and mixed fractions
3) Since it's a pen and paper test, some time gets wasted on searching for the correct option and then  marking the option on the OMR sheet, so effectively you have less than 8 minutes.
4) Also, sometimes the options are not in their most simplified form eg. if the answer is 1/2, then you need to look for 3/6 or 6/12.
5) You get +1 for every correct answer and -2 for incorrect. You get -2 for skipping a question, Oops!
6) Cut-off score is around 60/80.


Test #2 : Sequences and Progression (25 questions, 30 minutes, MCQ)

After the 8-minute test around 50% of the students qualify for the 2nd test. For every question, you are given 6-7 numbers and then you have to recognize the next number in the sequence, you are given options to select from. The cut-off for this test is around 22/25, and there is no negative marking. Around 50% students clear this round.

You can practice from TraderTest, but it's not comprehensive. So you should also look at other resources on the web and in CAT study material.

Test #3 : Analytical Puzzles (Around 10 questions, 1 hour, Subjective)

The puzzles are math and number oriented. Practice a lot of puzzles from the web, some puzzles might get repeated. You need to write down the  correct approach to get full marks. Even if you don't know the right answer, writing some logical steps (although incomplete) might fetch you some marks.



Approximately half the students are eliminated after each round, so eventually only 1/8 of the total number of students make it to the final shortlist. At our time, around 35 students made it to the final shortlist out of 300 students who appeared for the test.

I have tried to give information as accurately as possible, but if you find any of the above incorrect, please bring it to my notice. I hope the above post helps you in your preparation :]