Evaluates the ability to implement a high-performance C extension for Python that performs portfolio risk…
Evaluates the ability to implement a high-performance C extension for Python that performs portfolio risk…: a task in Terminal-Bench 2.1 (Harbor git-repos dataset) (Harbor dataset). You have a Python baseline in portfolio baseline.py that calculates portfolio risk and return using nested loops…
The task
You have a Python baseline in portfolio_baseline.py that calculates portfolio risk and return using nested loops. Complete the provided skeleton files (portfolio_optimized.c and portfolio_optimized.py) to create a faster C implementation. The skeleton files have TODO markers where you need to fill in the code.
Part of qingyu-lyq/terminal-bench-2.1.