To get a good appreciation of what market_prices
offers and how it works it's recommended that the following tutorials are worked through in the order listed.
- quickstart.ipynb
- An introduction to basic usage and a peek beyond.
These tutorials covers all aspects of the Prices classes get
method which is used to get a prices dataset.
- prices.ipynb
- Create a prices object from
PricesYahoo
orPricesCsv
.
- Create a prices object from
- intervals.ipynb
- Define the time interval represented by each row of a prices table.
- periods.ipynb
- Define the period covered by a prices table.
- The Golden Rule
- The Silver Rule
- Define period from
start
throughend
. - Define period as a duration bound with
start
orend
.- Durations in terms of trading times with
minutes
andhours
. - Durations in terms of trading sessions with
days
. - Durations in calendar terms with
weeks
,months
andyears
.
- Durations in terms of trading times with
- Multiple symbols trading on different exchanges with differing opening times and in different timezones.
lead_symbol
option to determine the exchange calendar against which to evaluate the period.
- Timezones (
tzin
) add_a_row
option to include the row prior to period start.
- Define the period covered by a prices table.
- anchor.ipynb
- How indices are evaluated.
- "open" and "workback"
anchor
force
indices to exclude non-trading periods.openend
to determine the final indice when the period end is an unaligned session close.- Overlapping indices warning.
- Circumstances in which indices are unable to observe session breaks.
- "open" and "workback"
- Interrogating indices with
.pt
accessor methods.
- How indices are evaluated.
- data_availability.ipynb
- How availabiliy of data at underlying base intervals determines the period over which data is available for any specific interval.
PricesIntradayUnavailableError
andLastIndiceInaccurateError
.- Options when a request can only be partially fufilled;
strict
,priority
andcomposite
. - Composite calendars.
- other_get_options.ipynb
- Post-processing options, including
tzout
,fill
,include
,exclude
,side
,close_only
andlose_single_symbol
.
- Post-processing options, including
These tutorials cover other methods of Prices classes.
- specific_query_methods
- Covers the following methods that return a single-row
DataFrame
giving prices for a specific session, time or period.session_prices
close_at
price_at
price_range
- Covers the following methods that return a single-row
- other_prices_methods
- Covers the following methods:
request_all_prices
to request all available prices from the data provider.prices_for_symbols
to return a Prices instance for a subset of symbols.
- Covers the following methods:
The .pt
accessor opens the door to a wealth of functionality to interrogate and operate on DataFrame
returned by get
.
- pt_accessor.ipynb
- Examples of all the properties and methods offered by the price table accessor classes, from reindexing and downsampling to querying and tidying.
parsing.md offers a explanation of how the valimp
library is used to validate and otherwise parse inputs to public functions.
typing.md covers:
- Type annotation.
- Custom types of the
mptypes.py
module.
method_doc.md explains what to expect from the documentation of public methods.
See the Issues page for outstanding issues.
Contributions to market_prices
are certainly welcome. If you are looking to contribute, please do have a look through the following developer docs.
- The internals around serving price data.
- Data providers.
- typing specifications.
- documentation specifications.
- Tests for
PricesBase
. - Data from yahoo API is unreliable for test suite.
- Versioning.
- Draft release notes.
- Release workflow.
- Considerations for intervals that are not a factor of (sub)session length.
daterange.GetterIntraday.daterange_tight