45

真的!独家! | 关于Quant/Trader求职分享(附真实试题)

 5 years ago
source link: http://mp.weixin.qq.com/s?__biz=MzAxNTc0Mjg0Mg%3D%3D&%3Bmid=2653291844&%3Bidx=1&%3Bsn=3fd8b57d32a0ebd43b17fa68ae954471&%3Butm_source=tuicool&%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

BrEbEzF.png!web 标星★公众号      爱你们

作者:辰 | 公众号特约作者

近期原创文章:

♥  基于无监督学习的期权定价异常检测(代码+数据)

♥  5种机器学习算法在预测股价的应用(代码+数据)

♥  深入研读:利用Twitter情绪去预测股市

♥  Two Sigma用新闻来预测股价走势,带你吊打Kaggle

  利用深度学习最新前沿预测股价走势

♥  一位数据科学PhD眼中的算法交易

♥  基于RNN和LSTM的股市预测方法

♥  人工智能『AI』应用算法交易,7个必踩的坑!

♥  神经网络在算法交易上的应用系列(一)

♥  预测股市 | 如何避免p-Hacking,为什么你要看涨?

♥  如何鉴别那些用深度学习预测股价的花哨模型?

♥  优化强化学习Q-learning算法进行股市

本文来自纽约大学金融数学2018级毕业的宽客,也是公众号一位特别可爱的、特别nice的忠实粉丝 aYzmain.png!web 。为我们独家分享关于Quant/Trader求职经验,包括大神级的买方2 sigma一类。

真的很干哦,也希望对大家在未来的求职中有所帮助!

从2018暑假接到第一个来自Jane Street的面试,我找工作这场仗,一直打到了2019的4月,终于签了一个小quant shop的全职。持续一年多的生存之战中,我面过大大小小一系列专项不同的岗位:traditional trader,marketmaker,quant trader,quant researcher(front desk & risk),甚至quant developer。从面试说话紧张结巴、一被问算法题会蒙蔽的状态,(对方:Just start from brutal force solution.. then wecan talk about optimization)我逐渐学会了和电话线那一端的听众分享我的思路,甚至期待与面试官聊天(友道:“有面试是好事!”)。这个过程中,我不断接到拒信不断地碰壁,一次、两次失败的时候,我觉得不合适罢了,是一个一个的学习机会,没什么不自信的。次数多了,心理阴影面积也幂次数增长了。事后通常会反省自己,好抓住下一个机会:绿书还是没好好掌握,说话应该要沉稳、语速放慢,简历就像分享故事一样说出来。过程中学习的各种知识点多起来了,面试被问到的问题重复的概率也大了。

我面了~30来家买方卖方,整理部分问题出来。满满都是干货。

1. 基础知识

买方卖方侧重点不同。 比如卖方侧重定价和结构化产品,买方会问机器学习和brainteaser 。概率都是重点。题目包括:stochastic calculus,统计题,regression,econometrics,finance包括options和对Black Scholes理解,portfolio management,machinelearning等等方面。大多从绿书,150题和glassdoor上可以找到。

2. 简历

第一个实习经历特别重要。跟面试官说的时候,先是big picture first:做了什么,为什么做这个project(model),解释模型的input output,最后公司怎么用这个模型。还有深入的细节,比如建模型时候遇到什么困难,怎么克服的,处理了什么数据。最好说说business和technical上遇到的挑战、具体的例子。

3. Project涉及的理论知识和业界理解

比如monte carlo simulation的variancereduction techniques,具体应该怎么做;SABR怎么调参的,数据是什么,还有SABR 怎么运用在金融产品中。准备时候多问问自己为什么,为什么这么做/涉及到的model的优劣势一类的。

4. 和面试官的沟通真的非常非常重要

他从中可以了解你的性格,是不是一个好的,他喜欢的合作伙伴,想问题时候是不是思维敏捷,说话是不是有条理,能不能把他说懂(口头表达能力),以及对业界的了解(是不是有热情真想干这行)。Behavioral喜欢问职业规划和teamwork。

平等交流最重要,你也在面试这家公司,看企业文化、岗位、同事合不合得来。

5. Interview的功利性刷题和实际的功力有不同

比如针对性地学习 “ Python面试大全“,“Java常见面试题”的概念,和刷常问的算法(二分,sort search,数据结构常问题)。可能并不能真正体现编程能力。但面试官测试你能力,也只能用这种应试方式。绿书可以面试前两天狂刷刷,很多还靠平时积累,比如怎么处理数据的问题。我主要针对绿书涉及的知识点,上google搜资料,补充学习。比如一些小的知识点decompose matrix和uniform random variable transform 到normalrandom variable。

6. 临场发挥很重要

问到接触过、掌握的东西,和面试官正好聊的来,他想找你这样的人,就是运气好。有的trading firm,和HR聊的很好。他说“get back to you”,却一直没get回来。这时候我就给自己分析原因。很可能有更合适的人,比如本科毕业背景更好有交易经验的,或者校友内推,并不一定是自己的个人问题。而当遇到知识点盲区,我觉得谦虚和展现有一定的基础都很重要。

比如和Barclays聊天,面试官问到我有没有用过KB test BP test,是用来测试homoskedasticity的,我反应说不太有印象,但在R package里曾经用过;后面她提及logistic model,我说我学过,是binary classification model,是判断0和1的,这时面试官说严格的说,你要是学过logistic model,就知道output是(0,1),而不是0、1。我说对,你说的对,我的意思是这个模型判断是0、1,但区间是在(0,1)之间。这时我感觉到我们之间聊天就不是很融洽,我当时的态度是不想犯错误,但真诚度和谦逊程度在面试官看来可能就不够了。Candidates众多的情况下,她就倾向于回答满分、同时聊天也其乐融融的candidate。

JaneStreet: Operation(career ladder up to trader)

Five coin tosses, the probability that you get three headsupward?

Forall numbers from 1-100, how many 9s are there in tens and digits?

时钟夹角问题

简历: machine learning

DRW: Quantitative Researcher

绿书的篮球问题,绿书上Markov Chain的问题,feature selection(特征工程,与简历有关)

GroupOne Trading: Junior Trader (NYU on campus)

先是一轮速算,包括二位数乘法,小数加减等等。

Introduction, Why group one, why trader, hobby, firstinternship experience, what if that company gives you offer?

Radix Trading: Quantitative Research(onsite)

Twocoding questions: 简历上概念(比如VaR),leetcode的题目

Given a collection of boxes, find the biggest chain of them thatcan be nested one inside another in order.

找一个array中最大和最小值

SIG: Trader

Introduction, Whysig

Background: GPA,GRE

What do you valuethe most in your job?

First Internshipexperience, hobby, strategies game

Optiver:  Trader(passedtest, phone screening: 说话抖音了)

First internship experience, introduction, what if give youreturn offer? Why optiver? Why trading? Teamwork and how you split the work?

FlowsTrader: Trader(passedtest, phone screening)

Internship experiences, What courses take, hobby, why flowstrader(how did you know), challenge, enjoy pressure environment? Receivecriticism and improve?

HudsonRiver Trading: Quant Researcher

Monte Carlo simulation tech: antithetic variates

Statistics problems: toss a coin for 1000 times, what is the probability that 600heads upward?

…..记不清题目了

Crossriver bank: Quantitative Researcher

Transition matrix,how to perform decomposition

ABS的问题,关于poolingand tranche

Bond:duration meaning,convexity,which one influenced by small change of interest rate more?

Bermuda: Quantitative Researcher

Explain greeks, swaps, monte carlo simulation

linear regression, ols, mle and Bayseian

MIO: Trader

HR经典问题,GPA,why MIO,do you follow the market:30 year bond yield?

CBOE(Onsite@NYC)

Options:

UseMonte Carlo Simulation:

Application:

I think in theindustry, for option pricing people tend to use the numerical method: MonteCarlo simulation. It’s good for high-dimension. For path-dependent’s exoticoptions and multiasset options, it is effective. In monte carlo, pathssimulated are independent and can be calculated using multithreading, so it canproduce precise results.

The other model: Black Scholes model has a weakness ofconstant volatility. It assumes the volatility to be constant, and there is nojump in the asset price, which is not so realistic. It also cannot captureearly exercise feature of American style option, so BS is better used forEuropean style options and American options that will be not early exercised (like All Ordinaries Share Price Index options on futures, because of its marginrequirement and non-dividend paying).

BS gives a goodway for getting implied vol, and Greeks for hedging: e.g. a delta neutralportfolio.

Inreality,price of options are determined by demand and supply under no-arbitrageconditions, (also influenced by implied vol). Models are a way for prediction,and can be adjusted according to historical data.

Futures: describe a trading strategy

1 million Futurestrading strategy:

As I mentioned, Iwill look at the term structure offutures and market conditions(contango or backwardation). I would like to do acalendar rolling strategy.

I would like tolong VIX futures when prices are low because VIX usually has a bottom of howlow it can be, but there is no limitation of how high it can be(even though itcan not stay long at high level):

For the calendar rolling strategy, Irebalance the strategy at the end of each month to sell to open thesecond-month contract and buy to close the position at the end of next month. Ican size VIX futures strategy to have equity like volatility with -100 basispoints of vega notional per dollar of capital( = -10 contracts for every$1,000,000 of capital).

I can also holdthe first-month contract and rolls its intra-month and rebalanced only atmonth-end to target the desired vega notional.

If multiplefutures are allowed in my portfolio, I can use VXX(two month VIX futures) andVIX futures for long and short.

I can also short UVXY and short SPX for hedging.In history, there is a negative correlation between VIX futures and returns ofSP500. The issue is VIX index and SPX index is not linearly related. When Ishort UVXY, and when UVXY goes up high, I probably need to short large amountsof SP500 to cover loss.

Howdid you calibrate SABR?

Makingproducts with SABR:

It is a stochasticvolatility model and can fit the volatility smile. It expressed the impliedvolatility in terms of the model’s parameters. So the model is more consistentwith entire volatility surface.

Howto imbed it into pricing: gives different volatilities fordifferent maturities, so it can be used to fit to the volatility smile foroptions with different maturities.

Practitionerscan buy SABR model: give them the flexibility to useintuition regarding market dynamics. Financial institutions can manage risksentailed by positions in derivatives. It treats Vol as a function of time, sopeople can use the model to know the vol smile and skew for options withdifferent maturities. as I mentioned, I think it has tractable pricing abilityto capture the correct shape of the smile and dynamic of the vol smile(assetprice is not log-normal distributed as assumed. So the model can capture thefat tail of the distribution, and the probability of people exercising OTM andITM options, so the pricing of options at the both end can be more accurate ).

CalibrationSABR:

(Spline mentioned in the interview: I guess itis a way to get linear interpolation between calculated volatilities?)

In my project, Iused market data for EURUSD from 15-Jan-2016. ATM: delta-neutral straddle,market RR and BF, the spot rate is 1.1 USD per EUR. Use a constant USD interestrate of 0.4%.

Given a fixedvalue of Beta, changing other parameters will yield different option valuesacross different tenors/expired and across different valuation dates.

Basically Iminimized the error between points as observed implied volatilities and thepoints that are fitted by SAR model for corresponding strikes. I pre-determinedbeta, that depend on a priori belief about the forward process, and set beta tobe 0.5. So the volatility term is multiplied by the square root of the currentlevel of forward(stochastic CIR model). 

Then I estimatealpha, rho and vega use Newton-Raphson method by minimizing errors(volatilitiesare calculated using Hetson model).

VIXproducts:

VIX futuresprovide clean exposure to future implied volatility of SP 500.

Short volatilityon SP 500 has a positive risk premium, as implied volatility has a strongtendency to be higher than realized volatility. I think some products includinginverse volatility ETFs are very interesting, such as SVXY, VMIN and ZIV.

I mentionednotional in our conversation, and I noticed mini-VIX futures has a veganotional of 100 but it currently traded with very little volume compared withthe bigger contract.

JPMorgan machine learning(Test):

  • 背包硬币问题

  • JP JavaDeveloper(passed first round, onsite):

  • Google到的java的面试题,数据结构

  • Stringbuilder,stringbuffer

  • Swap two elements(绿书)

  • Private constructor怎么call object

  • Detect circular linkedlist

  • Final finally finalize

  • Multithreading多线程保证安全性

  • 怎么让class static,解释staticfunction

  • Decorator pattern

  • Overload

  • Immutable的数据结构

  • Generic

MSCI

Give you ten yearsof equity prices, how to analyze the data? Give specific steps.

Time seriesanalysis.

Probability ofarranging 26 letters so that letters x, y, z is in this order but not need tobe consecutive.

Career ladder: What quant:price quant, trader?

What kind of Person:science person or art person?

2sigma data analysis

Fivenormal standard random variables, any two of them has the same correlation, sowe want to know the range of the correlation?

Answer:  The problem can be solved using the positivesemidefiniteness property of the correlation matrix.

Let thecorrelation between x1, x2; x1, x3; x1, x4…. be .

Thenthe correlation matrix for x1, x2, x3, x4, x5 is

M =   

Add allthe rest columns to the first column to get M1, which has the same determinantas M:

M1 =    

Det(M1)=(

M2 =    

Subtractthe first row from the rest of rows:

M3=   

Thendet(M3) =

Det(M2)= det(M3)=

Det(M1)=(1+4)

So 1+4

When1+4

So theminimum is -0.25.

Also,any principal submatrix of M is semipositive definite:

1-,(1+3), (1+2), (1+)

So,-0.25

Twotime series daily return, we calculated annual correlation, which is positive;and their monthly correlation. Is it possible for all monthly correlationnegative?

Yes.

If wedefine the monthly correlation as the correlation between monthly returns, notaccumulated returns between each day returns in a month.

Consider:

where  is the sum of month return(annual return), and is the sum of month return(annual return).   

=  >0

Consideran example, x1 = 10%, y1 = -20%; x2= -5%, y2 = 10%;  x3 = 4%, y3 = -6%; x4 = -3%, y4 = 5%; x5=-2%, y5 = 12% ...x1, y1; x2, y2; x3, y3; x4, y4, and x5, y5 are negativelycorrelated,

X6 =-2%, y6 = 5%; x7= 1%, y7 = -5%;  x8= 3%,y8= -4%; x9= 5%, y9 = 3%; x10 =-2%, y10 =

3%...x1, y1; x2, y2; x3, y3; x4, y4, and x5, y5 are negatively correlated but

X =(X1,X2) and Y=(Y1, Y2) are positively correlated.

The same argumentholds for 12 month. It is possible for pairwise returns to be negativelycorrelated for each individual months, but in annual terms, the totalcovariance to be positive (the denominator should be positive) and socorrelation to be positive.

Hong Kong Symmetry Investments

Projects, numerical methods, programming

Monte carlo simulation

Expected payoff of options iscalculated by taking average of these payoffs at the maturity date, thendiscounted back to present.

Three interfaces:

One receives uniform randomvariables from random variable generator and changes it to normal random variables.

One receives the normal randomvariable, and returns a path(make it more generic, not to stick with the GBMassumption in this project).

One for payouts: receives a stockpath, and returns a payout for the option (for Vanilla and for Asian options).

Importance sampling: (change ofmeasure): is use to estimate properties of aparticular distribution, h(x) To get E(h(x)), not draw x from the distributionof interest f(x), but draw x from g(x) and estimate E(ℎ( ) ( ) ( )).

In our example, for out of themoney European call option with strike price K and maturity T. If we samplevalues for the underlying asset price at T in the usual way, most paths willlead to zero payoff.

Research done on NumericalMethod for many parameters:

I mentioned Powell method, which isa bi-directional line search along each search vector.

For n search vectors, we passed aninitial point x0, and ai is the scalar determined during search along eachsearch vector. The update x with 1= 0+Σ =1, and Σ =1 is a new search vector added to the original n search vectors.The search vector that contributes the most to Σ =1 delete from the original list. The algo iterates until noimprovement is done.

Other root finding algos includebisection method, Brent’s method, secant method and inverse quadraticinterpolation. I think in industry, people use secant method a lot:

Let 0= ( 1)− ( 2) 1− 0( − 1)+ ( 1)

Solution is: = −1− ( −1) −1− −2 ( −1)− ( −2)

Other numerical methods to minimizethe function (such as the difference between the real value and estimated valueas a function of parameters ) including descent algorithm, linear search,second order optimization methods including Newton’s method, quasi-newtonmethod(which updates the approximation to the Hessian, I think it is lessexpensive to compute this way for many parameters),

Programming challenges:

A perfect number is defined as: n = 3+ 3= 3+ 3

Prime numbers in arange

UBS:

Futures andforward

Programming: adataframe with a colume called “a”, now want to use method and lambda functionto let every element of column “a” plus 1.

What is OOP? Datastructure: list and arraylist

What’s binarysearch and it’s time cost

If the underlyingstocks have dividends, impact on future price?

Wienner processand usefulness in finance.

Useof Brownian motion:

可以根据W(t)构造martingale(鞅),比如是个鞅。根据鞅的停时定律,判断W(t)是那么时候达到一定的值. 它是一个股价模型中的random source, 在资产定价基本定理中可运用,当股价是一个布朗运动,存在一个独特的风险中性测度。这个市场理论上没有套利活动。

一维布朗运动走势和价格曲线走势相似,在任意长度为t是分布均值为0方差为t的正态分布。当前值包含对未来做预测所需要的全部信息。

1. 轨迹穿越时间轴t。

2. B(t)不会偏离B(0)+-

3.M(t) 为0到t的布朗运动最大值,M(t)不小于任意值等于B(t)不小于任意值概率的两倍。可以量化股价极值的概率分布。

4. 连续不可微分。

1.2:股价很大概率在开盘价上下波动,随着交易时间推移,在t时刻股票价格不会偏离开盘价+-*价格波动标准差。

几何布朗运动:

股票价格的连续复利收益率近似服从正态分布。走势主要由漂移向控制,即在慢牛中我们可以考虑价值投资,长期持股。衍生品价格,是股票价格的函数,可利用伊藤引理来定价。

股票可以用布朗运动描述,衍生品价格是随机过程的函数.

Optimization:

在mean-variance optimization中运用,常用线性代数进行矩阵分解(市场的协方差矩阵)。

Optimization还包括了一些iterative methods,比如EM algorithm,gradient descent

Difference betweenR^2 and adjust R^2

Avoid overfittingin machine learning? Validation set

Pick top largest100 stocks in SP, use 30-year historical data to get alpha, is it good to tradealpha?

100 data pointsfor regression, if replicate 100 data points and use this 200 for regression,what’s difference between results?

What’s meanvariance optimization? If we have 100 stocks, given a specified risk level, howto construct the portfolio to maximize the return?

Machine learningproject, linear products: delta one

Future and forward prices: 期货高于现货,市场状况是期货升水和现货贴水(contango),应该是市场预期有关。是各期货投机者之问相互对赌的结果,像我们讨论的套利机会不会存在很久,因为套利很快让价格均衡。做空期货卖开仓只有在买家看涨的情况下愿意签订合约,不容易借到,期货价格和现货价格差别我觉得还跟场上参与者、庄家控制走势有关。另外期货和现货两者的关系还依赖于股指本身和市场上的利息变动。

Citiphone

1. Girsanov theorem

Whychange of measure

Risk

How toprice options, etc.

2. F-K equation

3. Forward measure

4. Ways to get BS differential equations(riskneutral and heat equation)

5. Quadratic variation

6. Dynamic binding

7. Shallow copy deep copy

8. Monte carlo variance reduction

9. Finite difference methods

Dynamic binding. Itmeans the codes that will be executed with reference to a method call is onlyknown during running time. When multiple classes contain differentimplementations of same method, a function will be selected from multiplefunction alternatives. In java, we usually declares object and in cpp we usevirtual function.

I have used it in method overriding--inpricing options with Monte Carlo simulation, I built a class for Europeanoptions by extending a payOff interface with a Price function. I wrote thePrice function differently with certain formula in the European options class.Later when I want to get the price of European options at a certain time, thefunction in European option class will be called. Doing so allows me to pricedifferent types of options with different payoff functions. 

Citi Onsite

FX:interest rate parity

Currencyconversion

Decideforeign exchange rate

Python: List and tuple

Multithreading

Seed: setthe initial integer value at the start of algorithm that generates randomnumbers. Once set, we can generate the same random numbers each time. If notset, then the system will choose the value automatically and so random numberswill be different based on different times.

Static:non-access modifier in java for blocks, variables, methods, and nested classes.It means there will be only one instance of that object in the class. When avariable is static, it is a class variable, and gets memory only once in theclass area at the time of class loading. If any object changes the value of thevariable, it will retain its value. Similarly, a static method belongs to theclass rather than the object of a class, can access static data member and canchange the value of it.

VaR

Put call parity

Implied vol andwhy

Martingale, superand submartingale

Statistics:you toss a dice,initial have $2, gets 6 can toss again, gets other numbers lose money, how muchare you willing to toss?

Socks: pigeon holequestion.

Taylor expansion:

Finra:

Euclidean distanceand manhattan

Lasso and ridgeregression

Decision Tree

Logisticregression

kaggle

Axioma: Client Supportrole(Quantitative Financial Solutions).

Replicateportfolio, and report

Factor models andoptimization

Chicago Trading Company

Behavioralquestions:

Solve challengesin a team

Conflict withteammates

OOPin python:

Inheritance:subclass inherits superclass, as I mentioned in our conversation that overridea method can be an example. Subclass use methods of superclass and makemodifications of it to behave differently.

There are alsopolymorphism and encapsulation. For encapsulation, we can restrict access tomethods and variables. In my projects in java, I have built private, public andprotected classes; in python, I used underscore such as single “_” or double“__”.

For polymorphism,I used classes to implement interfaces.

Mergetwo files with keys

Listand tuple, when to use

Generatorand example

Largedataset read and shut down

Environmentof python, problem using the notebook

Readtype of data except for csv

Problemwhen output files are messy

Packagesin python, numpy, pandas, Dataframe

Sqlin python

Whento use np array and dataframe

Decorator:wrapper

老东家(不透露名字了)

Internship:machine learning

Stochasticgradient descent v.s. gradient descent

KKN, Kmeans, PCAprinciple

Linear regressionand assumptions

Monte Carlosimulation: accuracy

VAR: three waysand disadvantages and advantages

Statistics方面:

Poisson process,exponential distribution

conditionalvariance and variance

GARCH, ARCH

homoskedasticity

autoregression

jointdistribution: p(x,y) = kxy, x can be 1, 2, 3, and y can be 1, 2, 3, P(x +y)>=5

Sharpe ratio

Binomial tree

和Trader 聊天:

Introduction,internship: how markov chain works, many states: initial values S andindependent transient probability

Implementation ofmodel for SVM: what if price goes up 10bps many times, but ends up the day at -30bps

Options:American options and European options; values of American options always largerthan European options, never early exercise options: intrinsic values + timevalues

When will you exerciseAmerican options early

Convexity: mu E(X)> E(mu X)

Straddle: what isthat?

Statistics: howlong it decays, how many lasers decay in a certain time period use what models

Expectation ofrolling a die and get values on it. Roll it twice and roll it three times

Number of rolls toget HH (犯了弱智错误,少了一个state,给了hint,很快反应过来),HHH… distributionof times of rolling(exponential distribution).

Brainteasers(反应迅速很重要,感谢我有段时间狂练二位数乘法)

0’s in 100!,depends on # of 5(我说:我可以写个algo吗,trader:comeon,you don’t evenneed a paper)

0‘s in 800!

Drop eggs(150题)

请给小姐姐打赏吧!

—End—

量化投资与机器学习微信公众号,是业内垂直于 Quant MFE CST 等专业的主流自媒体。公众号拥有来自 公募、私募、券商、银行、海外 等众多圈内 10W+ 关注者。每日发布行业前沿研究成果和最新资讯。

URb6b2z.jpg!web


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK