一亩三分地论坛

 找回密码
 Sign Up 注册获取更多干货
码农求职神器Triplebyte:
不用海投,内推多家公司面试
Airbnb 数据科学职位
in analytics and inference
游戏初创公司
招聘工程师、Designer和游戏策划
游戏初创公司DreamCraft招聘工程师、UIUX Designer和游戏策划
把贵司招聘信息放这里
查看: 7126|回复: 13
收起左侧

Quantlab 试题

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

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

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

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

x
鏉ユ簮涓浜.涓夊垎鍦拌鍧.
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.
. Waral 鍗氬鏈夋洿澶氭枃绔,
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.
-google 1point3acres
_______________________________________________________________________________

Input:
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>

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.
Thus any solution that reads the entire file contents into memory at once is unacceptable.

Definitions
- TimeStamp is value indicating the microseconds since midnight.
- 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.
. more info on 1point3acres.com- 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.

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:
- 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.. 1point3acres.com/bbs
  Result should be truncated to whole numbers.
. visit 1point3acres.com for more.
  Example: the following trades
        20 shares of aaa @ 18
        5 shares of aaa @ 7. 鍥磋鎴戜滑@1point 3 acres
        Weighted Average Price = ((20 * 18) + (5 * 7)) / (20 + 5) = 15

Output:
Your solution should produce a file called 'output.csv'.. Waral 鍗氬鏈夋洿澶氭枃绔,
file should be a comma separate file with this format:
<symbol>,<MaxTimeGap>,<Volume>,<WeightedAveragePrice>,<MaxPrice>

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
52930489178,aaa,18,1222
52931654404,aaa,9,1077
52933453444,aab,9,756

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

Send your source code and output.csv back for evaluation when complete..鏈枃鍘熷垱鑷1point3acres璁哄潧
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
你怎么申请的呢???
. From 1point 3acres bbs
去年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都可以申请么?
. From 1point 3acres bbs
我是本科生==申的貌似是technical intern。
还有个专门给master的intern貌似是做research的。鉴于还没读master就没关心。
回复 支持 反对

使用道具 举报

xiaozhuxiaozhu 发表于 2016-1-12 12:36:54 | 显示全部楼层
henear 发表于 2016-1-12 12:30. From 1point 3acres bbs
我是本科生==申的貌似是technical intern。. from: 1point3acres.com/bbs
还有个专门给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
不是我不想发,是附件过大了==
要不留个邮箱?

iverson926@hotmail.com
. 1point 3acres 璁哄潧
谢谢楼主
回复 支持 反对

使用道具 举报

 楼主| henear 发表于 2016-1-13 06:47:10 | 显示全部楼层
yajiren1 发表于 2016-1-13 04:20. 涓浜-涓夊垎-鍦帮紝鐙鍙戝竷
谢谢楼主

发过去了
回复 支持 反对

使用道具 举报

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
想看、谢谢谢谢
. Waral 鍗氬鏈夋洿澶氭枃绔,
那你也留个邮箱吧
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

custom counter

GMT+8, 2018-1-18 04:19

Powered by Discuz! X3

© 2001-2013 Comsenz Inc. Design By HUXTeam

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