A Complete Guide to Quantitative Trading Metrics

The worst part about quantitative trading isn’t having a bad strategy. It’s not knowing whether your strategy is good or bad. A strategy with 30% annualized returns sounds great, until you realize the max drawdown was 60% — you’d never have held through it. A Sharpe ratio of 2.0 looks impressive, but if it’s propped up by a few windfall trades in extreme market conditions, the Sortino ratio will tell a very different story. Quantitative trading metrics aren’t decorations for backtesting reports. They’re the tools that help you decide whether a strategy is worth putting real money behind. ...

Posted on 2026-04-10 ·  In Quant ·  7 min read

MEDUSA: Detailed Explanation of the Mechanism

MEDUSA is an acceleration framework designed to optimize the inference process for large language models (LLMs), specifically targeting the decoding phase in text generation tasks. Its core innovation lies in leveraging multiple decoding heads, which can simultaneously generate multiple candidate outputs, significantly reducing the time required for inference. Medusa: Simple LLM Inference Acceleration Framework with Multiple Decoding Heads Challenges in Traditional Decoding In conventional autoregressive decoding, the process typically involves the following steps: ...

Posted on 2025-01-03 ·  In NLP ·  4 min read

How to Use yfinance to Download Stock P/E Ratio

The Price-to-Earnings (P/E) ratio is a widely used financial metric that indicates how much investors are willing to pay for a dollar of earnings. Using Python’s yfinance library, you can easily download stock market data, including the P/E ratio. This blog will guide you step-by-step on how to retrieve the P/E ratio for stocks using yfinance. Step 1: Install and Import Required Libraries First, make sure you have yfinance installed. You can install it using pip if you haven’t already: ...

Posted on 2024-12-14 ·  In Quant ·  2 min read

A Tutorial to use yfinance

The yfinance Python library is a powerful tool for accessing financial data from Yahoo Finance. It allows users to download historical market data, fetch stock information, and analyze trends with minimal effort. In this tutorial, we will walk through the steps to install yfinance, retrieve stock data, and extract detailed stock information. 1. Installation To begin, ensure that yfinance is installed on your system: pip install yfinance 2. Downloading Historical Stock Data You can download historical stock prices using the yfinance.download method: ...

Posted on 2024-12-14 ·  In Quant ·  2 min read

How to Solve the Drive D Not Found Issue

Encountering the “Drive D: Not Found” error can be frustrating, especially when you rely on the drive for accessing critical data. This issue often occurs due to hardware malfunctions, incorrect system settings, or missing drive partitions. In this guide, we will walk you through the most effective troubleshooting steps to resolve the issue. 1. Verify Physical Connections The first step is to ensure that all hardware connections are secure: If Drive D: refers to an external hard drive or USB drive, check that the cables are properly connected and functional. Test the drive on another computer to confirm if it is recognized there. If not, the issue might be with the drive itself. For internal drives, ensure the SATA/IDE cables are securely attached inside the computer. 2. Check Disk Management Windows Disk Management can help identify if the drive is detected but not assigned a letter: ...

Posted on 2024-12-14 ·  In Misc ·  3 min read

How to Solve the Windows 11 RDP Black Screen Issue

If you’ve encountered the dreaded black screen when using Remote Desktop Protocol (RDP) on Windows 11, you’re not alone. This issue can be frustrating, especially if you rely on RDP for work or remote troubleshooting. This blog will guide you through the steps to fix this problem. Why Does the Black Screen Issue Occur? The black screen problem often arises due to incompatibilities or bugs introduced in updated NIC drivers. These drivers are critical for managing your network connections, and any conflict can disrupt services like RDP. Rolling back to a previous version of the NIC driver can resolve these compatibility issues. ...

Posted on 2024-12-14 ·  In Misc ·  2 min read

Key Questions Before Starting an LLM Startup

Before diving into an LLM-based startup, you should think through these five questions carefully. Failing to do so is a recipe for trouble down the road. ...

Posted on 2023-12-21 ·  In NLP ·  5 min read

Phi-2: The Surprising Power of Small Language Models

Microsoft released Phi-2, a 2.7 billion parameter language model that demonstrates outstanding reasoning and language understanding capabilities, achieving state-of-the-art performance among base language models with fewer than 13 billion parameters. On complex benchmarks, Phi-2 matches or outperforms models roughly 25 times its size, thanks to innovations in model scaling and training data curation. ...

Posted on 2023-12-14 ·  In NLP ·  3 min read

Textbooks Are All You Need: Key Takeaways

Microsoft recently proposed an intriguing approach: training models on synthetic textbooks instead of the massive datasets typically used. Paper: https://arxiv.org/abs/2306.11644 ...

Posted on 2023-12-13 ·  In NLP ·  2 min read

Spaghetti Code: Traps and Lessons in Development

In software development, there’s a term that resonates with almost every developer — “spaghetti code.” It vividly describes code that is chaotic, hard to understand, and nearly impossible to maintain. This post digs into what spaghetti code is, why it happens, and how to prevent it. ...

Posted on 2023-12-11 ·  In Coding ·  3 min read