《数据科学面试40+真题讲解》,K神本年度最后一次开课


一亩三分地论坛

 找回密码
 Sign Up 注册获取更多干货
码农求职神器Triplebyte:
不用海投,内推你去多家公司面试
Airbnb 数据科学职位
in analytics and inference
天天打游戏、照样领工资,
你要不要来?
把贵司招聘信息放这里
查看: 6846|回复: 13
收起左侧

Quantlab 试题

[复制链接] |试试Instant~ |关注本帖
henear 发表于 2016-1-5 04:39:23 | 显示全部楼层 |阅读模式

2016(7-9月) 分析|数据科学类 本科 实习@QuantLab - 校园招聘会 - 在线笔试 |Failfresh grad应届毕业生

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看,没有帐号?Sign Up 注册获取更多干货

x
. visit 1point3acres.com for more.
This problem will require you to write an application that will take in
an input file 'input.csv' and write out a new file calculated from the inputs.

Technology Choice (In order of preference)
#1 - An object oriented language
#2 - A functional language
鏉ユ簮涓浜.涓夊垎鍦拌鍧.
We are looking for an object oriented or functional solution.  A procedural scripting
solution isn't acceptable.
. 1point 3acres 璁哄潧
_______________________________________________________________________________

Input:. 1point3acres.com/bbs
The input file represents a very simplified stream of trades on an exchange.  
Each row represents a trade.  If you don't know what that means don't worry.  
The data can be thought of as a time series of values in columns:

<TimeStamp>,<Symbol>,<Quantity>,<Price>. 1point 3acres 璁哄潧

Although the provided input file is small, the solution should be able to handle
a source dataset well beyond the amount memory and hard disk space on your machine.. Waral 鍗氬鏈夋洿澶氭枃绔,
Thus any solution that reads the entire file contents into memory at once is unacceptable.

Definitions.鐣欏璁哄潧-涓浜-涓夊垎鍦
- TimeStamp is value indicating the microseconds since midnight..1point3acres缃
- Symbol is the 3 character unique identifier for a financial
  instrument (Stock, future etc.)
- Quantity is the amount traded
- Price is the price of the trade for that financial instrument.

Safe Assumptions:
- TimeStamp is always for the same day and won't roll over midnight.
- TimeStamp is increasing or same as previous tick (time gap will never be < 0).
- Price - our currency is an integer based currency.  No decimal points.
- Price - Price is always > 0.
. 鍥磋鎴戜滑@1point 3 acres.1point3acres缃
Example: here is a row for a trade of 10 shares of aaa stock at a price of 12
1234567890,aaa,10,12

Problem:
Find the following on a per symbol basis:. visit 1point3acres.com for more.
- Maximum time gap
  (time gap = Amount of time that passes between consecutive trades of a symbol)
  if only 1 trade is in the file then the gap is 0.
- Total Volume traded (Sum of the quantity for all trades in a symbol).
- Max Trade Price.
- Weighted Average Price.  Average price per unit traded not per trade.
  Result should be truncated to whole numbers.. From 1point 3acres bbs

  Example: the following trades
        20 shares of aaa @ 18
        5 shares of aaa @ 7
        Weighted Average Price = ((20 * 18) + (5 * 7)) / (20 + 5) = 15
. visit 1point3acres.com for more.
Output:
Your solution should produce a file called 'output.csv'.
file should be a comma separate file with this format:
<symbol>,<MaxTimeGap>,<Volume>,<WeightedAveragePrice>,<MaxPrice>.1point3acres缃

The output should be sorted by symbol ascending ('aaa' should be first).

Sample Input:
52924702314,aaa,13,1136
52924702549,aac,20,477
52925641407,aab,31,907
52927350412,aab,29,724
52927783980,aac,21,638. visit 1point3acres.com for more.
52930489178,aaa,18,1222
52931654404,aaa,9,1077 鏉ユ簮涓浜.涓夊垎鍦拌鍧.
52933453444,aab,9,756

Sample Output:. more info on 1point3acres.com
aaa,5786864,40,1161,1222
aab,6103032,69,810,907
aac,3081431,41,559,638. 鐣欏鐢宠璁哄潧-涓浜╀笁鍒嗗湴

Send your source code and output.csv back for evaluation when complete.
Include the amount of time you spent working on the solution and
simple instructions for building and/or running your solution.




补充内容 (2016-1-5 04:40):
input.csv 是个20000多行的csv文件,格式与sample input一样

评分

1

查看全部评分

yajiren1 发表于 2016-1-12 11:07:33 | 显示全部楼层
楼主可以私我一下csv file吗? 虽然没申quantlab. 但想练习练习
回复 支持 反对

使用道具 举报

 楼主| henear 发表于 2016-1-12 11:46:25 | 显示全部楼层
yajiren1 发表于 2016-1-12 11:07
楼主可以私我一下csv file吗? 虽然没申quantlab. 但想练习练习

不是我不想发,是附件过大了==
要不留个邮箱?
回复 支持 反对

使用道具 举报

xiaozhuxiaozhu 发表于 2016-1-12 12:14:10 | 显示全部楼层
你怎么申请的呢???
回复 支持 反对

使用道具 举报

 楼主| henear 发表于 2016-1-12 12:19:32 | 显示全部楼层
xiaozhuxiaozhu 发表于 2016-1-12 12:14. Waral 鍗氬鏈夋洿澶氭枃绔,
你怎么申请的呢???
. 鐣欏鐢宠璁哄潧-涓浜╀笁鍒嗗湴
去年9月招聘会投的简历,10月底发email告诉我可以申了,11月发的题,12月初把我拒了==

评分

1

查看全部评分

回复 支持 反对

使用道具 举报

xiaozhuxiaozhu 发表于 2016-1-12 12:26:15 | 显示全部楼层
henear 发表于 2016-1-12 12:19
去年9月招聘会投的简历,10月底发email告诉我可以申了,11月发的题,12月初把我拒了==

一般cs master都可以申请么?
回复 支持 反对

使用道具 举报

 楼主| henear 发表于 2016-1-12 12:30:52 | 显示全部楼层
xiaozhuxiaozhu 发表于 2016-1-12 12:26
一般cs master都可以申请么?

我是本科生==申的貌似是technical intern。 鏉ユ簮涓浜.涓夊垎鍦拌鍧.
还有个专门给master的intern貌似是做research的。鉴于还没读master就没关心。
回复 支持 反对

使用道具 举报

xiaozhuxiaozhu 发表于 2016-1-12 12:36:54 | 显示全部楼层
henear 发表于 2016-1-12 12:30
我是本科生==申的貌似是technical intern。. 鐣欏鐢宠璁哄潧-涓浜╀笁鍒嗗湴
还有个专门给master的intern貌似是做research的。鉴于还没读 ...

lz能不能给个hr的联系方式么。
回复 支持 反对

使用道具 举报

 楼主| henear 发表于 2016-1-12 12:41:17 | 显示全部楼层
xiaozhuxiaozhu 发表于 2016-1-12 12:36
lz能不能给个hr的联系方式么。

我查了一下他所有邮件都通过jobvite发的==
回复 支持 反对

使用道具 举报

yajiren1 发表于 2016-1-13 04:20:55 | 显示全部楼层
henear 发表于 2016-1-12 11:46
不是我不想发,是附件过大了==. more info on 1point3acres.com
要不留个邮箱?

iverson926@hotmail.com

谢谢楼主
回复 支持 反对

使用道具 举报

 楼主| henear 发表于 2016-1-13 06:47:10 | 显示全部楼层

发过去了
回复 支持 反对

使用道具 举报

yajiren1 发表于 2016-1-13 10:39:02 | 显示全部楼层
. 鐣欏鐢宠璁哄潧-涓浜╀笁鍒嗗湴
收到啦 谢谢。。
回复 支持 反对

使用道具 举报

dummy88 发表于 2016-1-17 16:22:28 | 显示全部楼层
想看、谢谢谢谢
回复 支持 反对

使用道具 举报

 楼主| henear 发表于 2016-1-18 13:58:12 | 显示全部楼层
dummy88 发表于 2016-1-17 16:22
想看、谢谢谢谢

那你也留个邮箱吧
回复 支持 反对

使用道具 举报

本版积分规则

关闭

一亩三分地推荐上一条 /5 下一条

手机版|小黑屋|一亩三分地论坛声明

custom counter

GMT+8, 2017-11-20 03:57

Powered by Discuz! X3

© 2001-2013 Comsenz Inc. Design By HUXTeam

快速回复 返回顶部 返回列表