Fix typed Python dividend-history example

Đang mở Phù hợp với người mới
#2,858 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ó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
90/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
documentation

Hướng nghiên cứu

Mở Resources/securities/corporate-actions/dividends.html và so sánh ví dụ Python có kiểu dữ liệu về lịch sử cổ tức với các ví dụ liền kề và ví dụ tương ứng trong 03 Writing Algorithms/14 Datasets/02 QuantConnect/23 US Equity Security Master/09 Historical Data.html. Thay đổi lời gọi để yêu cầu dữ liệu Dividend cho cùng một mã; hoàn tất khi kiểu generic và đối số đầu tiên khớp với ví dụ mong đợi.

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

Mô tả

Problem

The typed Python dividend-history example in Resources/securities/corporate-actions/dividends.html currently reads:

dividends = self.history[Split](Dividend, timedelta(4*365))

The generic type requests splits, and the first argument is the Dividend class rather than an Equity Symbol. This does not match the typed dividend-history call described immediately above it or the neighboring C# example.

The shared resource is included in the US Equity Corporate Actions page and the India Equity draft.

Verification

  • QCAlgorithm.History<T>(Symbol symbol, TimeSpan span, ...) in QCAlgorithm.History.cs expects the symbol as its first argument.
  • 03 Writing Algorithms/14 Datasets/02 QuantConnect/23 US Equity Security Master/09 Historical Data.html already provides the matching typed dividend example: self.history[Dividend](self._symbol, timedelta(5*365)).

This is a source/signature check; the broken example was not executed.

Expected result

The typed example should request Dividend data for the same symbol as the neighboring examples. Suggested correction:

dividends = self.history[Dividend](symbol, timedelta(4*365))
Ngôn ngữ chính
HTML
Star
267
Fork
190
Merge trung bình
16 giờ 23 phút
Pull request đã merge (30 ngày)
73

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

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 QuantConnect/Documentation

Tất cả issue của QuantConnect/Documentation

Issue tương tự

Thêm issue về Documentation

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.