<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Elias Wu</title>
    <description>The latest articles on DEV Community by Elias Wu (@eliasswu).</description>
    <link>https://dev.to/eliasswu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3837999%2F46e4b70f-dcf4-481d-b2ba-a1557a905831.jpeg</url>
      <title>DEV Community: Elias Wu</title>
      <link>https://dev.to/eliasswu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eliasswu"/>
    <language>en</language>
    <item>
      <title>I built a small Python library for factor research — mainly because I got tired of stitching everything together myself.</title>
      <dc:creator>Elias Wu</dc:creator>
      <pubDate>Sun, 22 Mar 2026 06:22:24 +0000</pubDate>
      <link>https://dev.to/eliasswu/i-built-a-small-python-library-for-factor-research-mainly-because-i-got-tired-of-stitching-701</link>
      <guid>https://dev.to/eliasswu/i-built-a-small-python-library-for-factor-research-mainly-because-i-got-tired-of-stitching-701</guid>
      <description>&lt;p&gt;Showcase&lt;/p&gt;

&lt;p&gt;Every time I wanted to test a factor idea, the workflow was always the same:&lt;/p&gt;

&lt;p&gt;clean the factor&lt;/p&gt;

&lt;p&gt;neutralize / standardize&lt;/p&gt;

&lt;p&gt;run IC&lt;/p&gt;

&lt;p&gt;build long-short portfolios&lt;/p&gt;

&lt;p&gt;analyze exposures&lt;/p&gt;

&lt;p&gt;And I kept rewriting the same pipeline over and over again.&lt;/p&gt;

&lt;p&gt;So I built AlphaPurify — a lightweight library that tries to handle the whole factor research loop in one place.&lt;/p&gt;




&lt;p&gt;What My Project Does&lt;/p&gt;

&lt;p&gt;AlphaPurify is a Python library for factor construction, preprocessing, backtesting, and return attribution.&lt;/p&gt;

&lt;p&gt;The idea is pretty simple:&lt;br&gt;
give it a DataFrame with time, asset, price, and factor — and it handles the rest.&lt;/p&gt;

&lt;p&gt;It currently supports:&lt;/p&gt;

&lt;p&gt;Factor preprocessing (winsorization, standardization, neutralization, etc.)&lt;/p&gt;

&lt;p&gt;IC / Rank IC analysis&lt;/p&gt;

&lt;p&gt;Quantile-based long / short / long-short backtests&lt;/p&gt;

&lt;p&gt;Factor return attribution (multi-factor exposures)&lt;/p&gt;

&lt;p&gt;Interactive reports (via Plotly)&lt;/p&gt;

&lt;p&gt;It’s fully vectorized + multiprocessing, so it runs pretty fast even on large datasets.&lt;/p&gt;




&lt;p&gt;Target Audience&lt;/p&gt;

&lt;p&gt;People who already do factor research (or are trying to get into it), especially:&lt;/p&gt;

&lt;p&gt;quant students&lt;/p&gt;

&lt;p&gt;researchers&lt;/p&gt;

&lt;p&gt;anyone working with cross-sectional factors&lt;/p&gt;

&lt;p&gt;It’s not meant to be a full trading system — more like a fast “idea validation tool”.&lt;/p&gt;

&lt;p&gt;The project is still early stage, but usable.&lt;br&gt;
Would really appreciate feedback or ideas on what to improve.&lt;/p&gt;




&lt;p&gt;Comparison&lt;/p&gt;

&lt;p&gt;From my experience using other tools:&lt;/p&gt;

&lt;p&gt;vs Alphalens:&lt;br&gt;
Alphalens is great for IC, but stops there.&lt;br&gt;
AlphaPurify extends that into full backtesting + attribution.&lt;/p&gt;

&lt;p&gt;vs Backtrader:&lt;br&gt;
Backtrader is flexible, but you need to build everything yourself.&lt;br&gt;
AlphaPurify is more opinionated and factor-focused.&lt;/p&gt;

&lt;p&gt;vs Qlib:&lt;br&gt;
Qlib is powerful but heavy.&lt;br&gt;
AlphaPurify is much lighter and easier to start with.&lt;/p&gt;

&lt;p&gt;vs QuantStats / Pyfolio:&lt;br&gt;
Those focus on performance analysis, not factor testing.&lt;/p&gt;

&lt;p&gt;So the goal here isn’t to replace them — just to make the factor workflow faster and simpler.&lt;/p&gt;




&lt;p&gt;GitHub&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/eliasswu/Alphapurify" rel="noopener noreferrer"&gt;https://github.com/eliasswu/Alphapurify&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;pip install alphapurify&lt;/p&gt;




&lt;p&gt;If you’ve done factor research before —&lt;br&gt;
I’m curious: what part of the workflow do you find the most annoying or repetitive?&lt;/p&gt;

&lt;p&gt;That’s probably what I should optimize next.&lt;/p&gt;

</description>
      <category>python</category>
      <category>opensource</category>
      <category>programming</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
