推荐:数据科学课程和书籍清单以及培训讲座


一亩三分地论坛

 找回密码
 获取更多干活,快来注册

一亩三分地官方iOS手机应用下载
查看: 6323|回复: 13
收起左侧

Quantlab 试题

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

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

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

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

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.. 1point 3acres 璁哄潧

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.. 鐗涗汉浜戦泦,涓浜╀笁鍒嗗湴

_______________________________________________________________________________ 鏉ユ簮涓浜.涓夊垎鍦拌鍧.

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 . Waral 鍗氬鏈夋洿澶氭枃绔,
a source dataset well beyond the amount memory and hard disk space on your machine.. more info on 1point3acres.com
Thus any solution that reads the entire file contents into memory at once is unacceptable.
.1point3acres缃
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. 1point 3acres 璁哄潧
- 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

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).. 1point3acres.com/bbs
- Max Trade Price.
- Weighted Average Price.  Average price per unit traded not per trade.
. Waral 鍗氬鏈夋洿澶氭枃绔,  Result should be truncated to whole numbers.

  Example: the following trades
        20 shares of aaa @ 18
        5 shares of aaa @ 7
        Weighted Average Price = ((20 * 18) + (5 * 7)) / (20 + 5) = 15
.1point3acres缃
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>

The output should be sorted by symbol ascending ('aaa' should be first).
. 涓浜-涓夊垎-鍦帮紝鐙鍙戝竷
Sample Input:. from: 1point3acres.com/bbs
52924702314,aaa,13,1136
52924702549,aac,20,477
52925641407,aab,31,907. 1point 3acres 璁哄潧
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. more info on 1point3acres.com
aac,3081431,41,559,638
. From 1point 3acres bbs
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.
. 鍥磋鎴戜滑@1point 3 acres
. 涓浜-涓夊垎-鍦帮紝鐙鍙戝竷

.鏈枃鍘熷垱鑷1point3acres璁哄潧
补充内容 (2016-1-5 04:40):
input.csv 是个20000多行的csv文件,格式与sample input一样

评分

1

查看全部评分

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

使用道具 举报

 楼主| henear 发表于 2016-1-12 11:46:25 | 显示全部楼层
关注一亩三分地微博:
Warald
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.鐣欏璁哄潧-涓浜-涓夊垎鍦
你怎么申请的呢???

去年9月招聘会投的简历,10月底发email告诉我可以申了,11月发的题,12月初把我拒了==

评分

1

查看全部评分

回复 支持 反对

使用道具 举报

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

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

使用道具 举报

 楼主| henear 发表于 2016-1-12 12:30:52 | 显示全部楼层
xiaozhuxiaozhu 发表于 2016-1-12 12:26. visit 1point3acres.com for more.
一般cs master都可以申请么?
. visit 1point3acres.com for more.
我是本科生==申的貌似是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.鐣欏璁哄潧-涓浜-涓夊垎鍦
不是我不想发,是附件过大了==
要不留个邮箱?

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. from: 1point3acres.com/bbs
想看、谢谢谢谢

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

使用道具 举报

本版积分规则

关闭

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

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

custom counter

GMT+8, 2017-7-25 22:57

Powered by Discuz! X3

© 2001-2013 Comsenz Inc. Design By HUXTeam

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