FinanceRoutines.jl

Financial data routines for Julia
Log | Files | Refs | README | LICENSE

index.md (2599B)


      1 # FinanceRoutines.jl
      2 
      3 *Some useful tools to work with academic financial data in Julia*
      4 
      5 ## Introduction
      6 
      7 This package provides a collection of routines for academic finance work.
      8 It gives you a clean pipeline from raw WRDS data (CRSP, Compustat) through to standard research datasets, plus tools for Fama-French factors, treasury yield curves, portfolio construction, and data diagnostics.
      9 
     10 File [issues](https://github.com/louloulibs/FinanceRoutines.jl/issues) for comments.
     11 
     12 
     13 ## Installation
     14 
     15 `FinanceRoutines.jl` is a registered package in the [`loulouJL`](https://github.com/LouLouLibs/loulouJL) registry.
     16 You can install it via the Julia package manager:
     17 
     18 ```julia
     19 using Pkg
     20 pkg"registry add https://github.com/LouLouLibs/loulouJL.git"
     21 Pkg.add("FinanceRoutines")
     22 ```
     23 
     24 Or install directly from GitHub:
     25 ```julia
     26 import Pkg
     27 Pkg.add("https://github.com/louloulibs/FinanceRoutines.jl")
     28 ```
     29 
     30 ## Usage
     31 
     32   - WRDS (CRSP, Compustat)
     33     + [WRDS User Guide](@ref) — download and merge CRSP/Compustat data
     34     + [Transitioning to the new CRSP file format](@ref) — SIZ to CIZ migration
     35 
     36   - Fama-French factors
     37     + `import_FF3()` — 3-factor model (market, size, value)
     38     + `import_FF5()` — 5-factor model (adds profitability, investment)
     39     + `import_FF_momentum()` — momentum factor
     40     + All support `:daily`, `:monthly`, `:annual` frequencies
     41 
     42   - Treasury yield curves
     43     + [Import Yield Curve Data](@ref) — GSW parameters, yields, prices, bond returns
     44 
     45   - Portfolio analytics
     46     + `calculate_portfolio_returns` — equal/value-weighted returns with optional grouping
     47     + `calculate_rolling_betas` — rolling window factor regressions
     48     + `event_study` — CARs and BHARs with market-adjusted, market model, or mean-adjusted methods (experimental)
     49     + `diagnose` — missing rates, duplicates, suspicious values
     50 
     51   - Demos
     52     + [Estimating Stock Betas](@ref) — unconditional and rolling betas
     53     + [Advanced WRDS](@ref) — custom Postgres queries
     54 
     55 ## Other Resources
     56 
     57 There are multiple online resources on using the WRDS Postgres database and build the standard finance and accounting datasets:
     58   
     59   - Ian D. Gow and Tony Ding: *"Empirical Research in Accounting: Tools and Methods"*; available [here](https://iangow.github.io/far_book/)
     60   - Chen, Andrew Y. and Tom Zimmermann: *"Open Source Cross-Sectional Asset Pricing"*; 2022, 27:2; available [here](https://www.openassetpricing.com/code/)
     61   - Christoph Scheuch, Stefan Voigt, Patrick Weiss: *"Tidy Finance with R"*; 2023; Chapman & Hall; available [here](https://www.tidy-finance.org/r/)
     62 
     63 
     64 
     65 ## Index
     66 
     67 ```@index
     68 ```