← 返回博客列表
IMC

IMC QR OA 真题分享

2025-09-18

IMC(International Market Centers)量化研OA 注重数学和算法。本文分享最新真题,csvosupport 助你拿到 Offer

📋 题目一:期权定

实现 Black-Scholes 期权定价模型

import math
from scipy.stats import norm

def black_scholes(S, K, T, r, sigma, option_type='call'):
    """
    S: 当前股价
    K: 行权
    T: 到期时间(年
    r: 无风险利
    sigma: 波动
    """
    d1 = (math.log(S / K) + (r + 0.5 * sigma ** 2) * T) / (sigma * math.sqrt(T))
    d2 = d1 - sigma * math.sqrt(T)
    
    if option_type == 'call':
        price = S * norm.cdf(d1) - K * math.exp(-r * T) * norm.cdf(d2)
    else:  # put
        price = K * math.exp(-r * T) * norm.cdf(-d2) - S * norm.cdf(-d1)
    
    return price

📋 题目二:市场微观结构

实现订单簿(Order Book)数据结构

from collections import defaultdict
import heapq

class OrderBook:
    def __init__(self):
        self.bids = []  # 最大堆(买单)
        self.asks = []  # 最小堆(卖单)
        self.orders = {}
    
    def add_order(self, order_id, side, price, quantity):
        order = {'id': order_id, 'price': price, 'qty': quantity}
        self.orders[order_id] = order
        
        if side == 'buy':
            heapq.heappush(self.bids, (-price, order_id))
        else:
            heapq.heappush(self.asks, (price, order_id))
    
    def cancel_order(self, order_id):
        if order_id in self.orders:
            del self.orders[order_id]
    
    def get_best_bid(self):
        while self.bids and self.bids[0][1] not in self.orders:
            heapq.heappop(self.bids)
        return -self.bids[0][0] if self.bids else None
    
    def get_best_ask(self):
        while self.asks and self.asks[0][1] not in self.orders:
            heapq.heappop(self.asks)
        return self.asks[0][0] if self.asks else None

📋 题目三:统计套利

计算两个资产的协整关系

import numpy as np

def calculate_cointegration(prices1, prices2):
    # 计算价差
    spread = np.array(prices1) - np.array(prices2)
    
    # 计算均值和标准
    mean_spread = np.mean(spread)
    std_spread = np.std(spread)
    
    # Z-score
    z_scores = (spread - mean_spread) / std_spread
    
    return z_scores

💼 csvosupport 助力

量化知识 - 金融数学和统 算法实现 - 高性能代码 数据结构 - 订单簿和时间序列 面试策略 - 量化岗位准备

联系 csvosupport,专业量OA 辅助


*标签 #IMC #量化 #QR #期权定价 #订单#OA代做 #面试辅助 #一亩三分地


需要面试真题? 立刻联系微信 Coding0201,获得真题