Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Asset pricing models use the normal distribution for p-values when debiased=True

Đang mở
#832 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
15/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
data

Hướng nghiên cứu

The inference is in the asset pricing models: TradedFactorModel, LinearFactorModel and LinearFactorModelGMM. Compare their p-value code with the IV and panel models, which already use the t and F distributions when debiased=True. The repro in the issue, run on the French dataset, shows the mismatch. Choosing degrees of freedom per estimator is a design decision for the maintainer, so agree on it before writing code.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

With debiased=True, the IV and panel models switch the reference distribution of their t-tests to the t distribution, and of their Wald tests to F. The asset pricing models (TradedFactorModel, LinearFactorModel, LinearFactorModelGMM) always use the normal distribution, so debiased=True only changes the covariance:

import numpy as np
from scipy import stats
from linearmodels.asset_pricing import TradedFactorModel
from linearmodels.datasets import french

data = french.load()
res = TradedFactorModel(
    data[["S1V1", "S1V5", "S5V1", "S5V5"]], data[["MktRF", "SMB", "HML"]]
).fit(debiased=True)
normal = 2 * stats.norm.sf(np.abs(res.tstats))
print(np.allclose(res.pvalues, normal))  # True

Using the t distribution needs a choice of degrees of freedom for each estimator, e.g. T - 1 for the time-series regressions of the traded model, or T - k, and something suitable for the two-pass and GMM estimators. It also changes the p-values. In 7.1 the docstrings say that the normal distribution is used.

Deferred from 7.1.

Ngôn ngữ chính
Python
Star
1.1k
Fork
203
Merge trung bình
3 giờ 26 phút
Pull request đã merge (30 ngày)
115

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bashtage/linearmodels

Tất cả issue của bashtage/linearmodels

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.