Skip to content

Commit

Permalink
Make additional market metrics optional (#105)
Browse files Browse the repository at this point in the history
* Make market metrics optional

* Enable manual workflow triggering
  • Loading branch information
Mytak authored Nov 24, 2023
1 parent 38f0c92 commit c3a2002
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ name: Python application
on:
push:
branches: [ master ]

workflow_dispatch:
inputs:
branch:
description: 'The branch to build'
required: true

jobs:
build:
Expand Down
26 changes: 13 additions & 13 deletions tastytrade/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@ class MarketMetricInfo(TastytradeJsonDataclass):
Contains lots of useful information, like IV rank, IV percentile and beta.
"""
symbol: str
implied_volatility_index: Decimal
implied_volatility_index_5_day_change: Decimal
implied_volatility_index: Optional[Decimal] = None
implied_volatility_index_5_day_change: Optional[Decimal] = None
implied_volatility_index_rank: Optional[str] = None
tos_implied_volatility_index_rank: Decimal
tw_implied_volatility_index_rank: Decimal
tos_implied_volatility_index_rank_updated_at: datetime
implied_volatility_index_rank_source: str
tos_implied_volatility_index_rank: Optional[Decimal] = None
tw_implied_volatility_index_rank: Optional[Decimal] = None
tos_implied_volatility_index_rank_updated_at: Optional[datetime] = None
implied_volatility_index_rank_source: Optional[str] = None
implied_volatility_percentile: Optional[str] = None
implied_volatility_updated_at: datetime
liquidity_rating: int
implied_volatility_updated_at: Optional[datetime] = None
liquidity_rating: Optional[int] = None
updated_at: datetime
option_expiration_implied_volatilities: List[OptionExpirationImpliedVolatility] # noqa: E501
beta: Decimal
corr_spy_3month: Decimal
option_expiration_implied_volatilities: Optional[List[OptionExpirationImpliedVolatility]] = None # noqa: E501
beta: Optional[Decimal] = None
corr_spy_3month: Optional[Decimal] = None
market_cap: Decimal
price_earnings_ratio: Decimal
earnings_per_share: Decimal
price_earnings_ratio: Optional[Decimal] = None
earnings_per_share: Optional[Decimal] = None
dividend_rate_per_share: Optional[Decimal] = None
implied_volatility_30_day: Optional[Decimal] = None
historical_volatility_30_day: Optional[Decimal] = None
Expand Down

0 comments on commit c3a2002

Please sign in to comment.