Currency Haircut with FX Forwards
Updated
Problem statement
A broker-dealer must keep a minimum amount of net capital. To find it, risk charges called haircuts are taken off the value of its positions. For currency risk, the haircut is charged on the net position in each foreign currency.
The positions table lists the firm's foreign cash and FX forwards, each with its value in U.S. dollars in market_value_usd (negative for a short position):
- A cash row has
symbol = 'cash', andcurrencyis the currency held. - A forward row has
symbol = 'Forward XXX', whereXXXis the three-letter code of the foreign currency the forward buys (positive value) or sells (negative value). Itscurrencycolumn is'USD', the currency it settles in. Dollars carry no currency haircut, so only theXXXside of a forward counts, and it counts toward currencyXXX.
For each currency that has at least one position, add up the values of its cash rows and its forward rows to get the net exposure. The haircut is the absolute value of the net exposure times that currency's haircut_percent from the haircut_rates table, divided by 100. Long and short positions in the same currency cancel out before the haircut is taken.
Return one row per currency with the columns currency, net_exposure_usd and haircut_usd, in any order. A decimal answer is accepted when it is within 0.0001 of the exact value.
Table schema
Use the same input data with any supported language. Open the Schema tab in the editor to see the generated SQL setup or Pandas DataFrames.
positions
Foreign cash and FX forward positions.
| Column | Type | Nullable | Description |
|---|---|---|---|
| position_idPK | Integer | No | Unique position ID. |
| symbol | Text | No | 'cash' or 'Forward XXX'. |
| currency | Text | No | Currency held for cash; 'USD' for a forward. |
| market_value_usd | Decimal | No | Value in U.S. dollars, negative when short. |
haircut_rates
Currency haircut rates.
| Column | Type | Nullable | Description |
|---|---|---|---|
| currency | Text | No | Three-letter currency code. |
| haircut_percent | Decimal | No | Haircut rate in percent, for example 6 for 6%. |
Expected result
Your query or function must return these columns.
| Column | Type | Nullable | Description |
|---|---|---|---|
| currency | Text | No | — |
| net_exposure_usd | Decimal | No | — |
| haircut_usd | Decimal | No | — |
Row order: any order is accepted. Numeric tolerance: 0.0001.
Constraints
- The
positionstable has between1and1000rows, andposition_idvalues are unique. symbolis'cash'or'Forward 'followed by a three-letter code.- Every currency code is three uppercase English letters. Cash rows never hold
'USD', and forward rows always havecurrency = 'USD'. market_value_usdhas at most 2 digits after the decimal point, and the absolute values in the wholemarket_value_usdcolumn add up to less than1010.- Each
currencyinhaircut_ratesis unique, and every currency that has a position has a row there. The table may also list currencies with no position. 0 <= haircut_percent <= 100, with at most 2 digits after the decimal point.
More Jane Street interview questions
- Product Profit SummaryOA · Seen Sep 2026
- Cheating CodemakerOA · Seen Mar 2026
- Bond Haircut by Ratings and MaturityOA · Seen Aug 2024
- Transform StringOA · Seen Jul 2024
- Price Deviation AlertsOA · Seen Nov 2023
- Trade Blotter Summary by TickerOA · Seen Jun 2021
- Biggest Daily Move and Longest Rising StreakOA · ONSITE INTERVIEW · Seen Apr 2021
- Transaction Fees by InstrumentOA · Seen Mar 2018
- Maximum-Scoring Consecutive Tree LevelsPHONE SCREEN · Seen Nov 2026
- Tree Selection and VisibilityPHONE SCREEN · Seen Nov 2026
Similar questions at other companies
- Students Scoring Above AverageCapstone Investment Advisors · OA
- Bond Interest Summary Above 3%Wells Fargo · OAWells Fargo interview questions
- Employee Promotion OpportunitiesIntuit · OAIntuit interview questions
- Students and Their SubjectsBirla Pivot · OA
- Companies with Average Salary Above 40000AT&T · OAAT&T interview questions
- Build Taxi Driver Performance FeaturesBoston Consulting Group · OABoston Consulting Group interview questions
- Weekend Appointments for Consular Services ReschedulingMcKinsey & Company · OAMcKinsey & Company interview questions
- Companies Above a Salary ThresholdVerisk · OA
- Customer Resource Usage AnalysisIBM · OAIBM interview questions
- Customers Who Never OrderedAccenture · OAAccenture interview questions
Interview reports that mention this question
- Jane Street TDOE UK Phone Screen: 15 Experiences (Part 4 of 10)
- Jane Street TDO Excel and VBA Test: 23 Experiences (Part 8 of 10)
- Jane Street TDO Earlier US Finals: 19 Experiences (Part 7 of 10)
- Jane Street TDOE Interviews: 165 Experiences (Part 1 of 10)
- Jane Street TDOE New Grad Interview Questions: 11 Experiences