一亩三分地论坛

 找回密码
 获取更多干货,去instant注册!

扫码关注一亩三分地公众号
查看: 3104|回复: 13
收起左侧

Quantlab 试题

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

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

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

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

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.

Technology Choice (In order of preference).鐣欏璁哄潧-涓浜-涓夊垎鍦
#1 - An object oriented language
. visit 1point3acres.com for more.#2 - A functional language
鏉ユ簮涓浜.涓夊垎鍦拌鍧.
We are looking for an object oriented or functional solution.  A procedural scripting
solution isn't acceptable.
. Waral 鍗氬鏈夋洿澶氭枃绔,
_______________________________________________________________________________

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.
.鏈枃鍘熷垱鑷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
- Price is the price of the trade for that financial instrument.-google 1point3acres

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.

Example: here is a row for a trade of 10 shares of aaa stock at a price of 12
1234567890,aaa,10,12
-google 1point3acres
Problem:
Find the following on a per symbol basis:. 1point 3acres 璁哄潧
- Maximum time gap
  (time gap = Amount of time that passes between consecutive trades of a symbol). 鍥磋鎴戜滑@1point 3 acres
  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.. visit 1point3acres.com for more.
- Weighted Average Price.  Average price per unit traded not per trade.
  Result should be truncated to whole numbers.. 1point 3acres 璁哄潧

  Example: the following trades
        20 shares of aaa @ 18. visit 1point3acres.com for more.
        5 shares of aaa @ 7
        Weighted Average Price = ((20 * 18) + (5 * 7)) / (20 + 5) = 15
. Waral 鍗氬鏈夋洿澶氭枃绔,
Output:
Your solution should produce a file called 'output.csv'.
file should be a comma separate file with this format:.1point3acres缃
<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
. From 1point 3acres bbs52931654404,aaa,9,1077. Waral 鍗氬鏈夋洿澶氭枃绔,
52933453444,aab,9,756
. 1point3acres.com/bbs
Sample Output:
aaa,5786864,40,1161,1222
aab,6103032,69,810,907
aac,3081431,41,559,638
. 1point 3acres 璁哄潧
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
你怎么申请的呢???

去年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
不是我不想发,是附件过大了==
要不留个邮箱?

iverson926@hotmail.com
. more info on 1point3acres.com
谢谢楼主
回复 支持 反对

使用道具 举报

 楼主| henear 发表于 2016-1-13 06:47:10 | 显示全部楼层
. 1point3acres.com/bbs
发过去了
回复 支持 反对

使用道具 举报

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.鏈枃鍘熷垱鑷1point3acres璁哄潧
想看、谢谢谢谢

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

使用道具 举报

本版积分规则

请点这里访问我们的新网站:一亩三分地Instant.

Instant搜索更强大,不扣积分,内容组织的更好更整洁!目前仍在beta版本,努力完善中!反馈请点这里

关闭

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

手机版|小黑屋|一亩三分地论坛声明 ( 沪ICP备11015994号 )

custom counter

GMT+8, 2017-1-22 16:43

Powered by Discuz! X3

© 2001-2013 Comsenz Inc. Design By HUXTeam

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