Skip to main content

Synthetic after-hours quote generator

Project description

afterquote

Synthetic after-hours quote generator based on an asset and its underlying security.

PyPI version CI


📦 What is this?

afterquote lets you estimate synthetic prices for a financial security based on the real-time performance of a given correlated underlying asset — useful when one market is closed and the other is still trading.


🚀 Installation

From PyPI:

pip install afterquote

Locally:

pip install -e .

🧪 Usage

from afterquote import SecurityPair

pair = SecurityPair("MAG5.L", "MAGS")
print(pair.info())
print(pair.pricing())

📘 Example Output

                          base_security underlying_security  base_is_live  leverage           base_close_time  base_close_price  adj_percent_return  quote_price
quote_time
2025-05-17 00:59:00+01:00        MAG5.L                MAGS         False         5 2025-05-16 16:30:00+01:00            1160.0           -9.524988  1049.510137
                             Impl_Open    Impl_High     Impl_Low   Impl_Close
Datetime
2025-05-16 16:30:00+01:00  1160.000000  1161.112373  1160.000000  1160.000000
2025-05-16 16:31:00+01:00  1166.674491  1166.895738  1166.450943  1160.000000
2025-05-16 16:32:00+01:00  1168.417608  1168.417608  1168.068568  1162.845038
2025-05-16 16:33:00+01:00  1168.910139  1169.357836  1168.869835  1164.448536
2025-05-16 16:34:00+01:00  1170.029168  1170.029168  1169.805191  1163.333992
...                                ...          ...          ...          ...
2025-05-17 00:55:00+01:00  1055.186402  1055.934313  1055.108109  1049.593529
2025-05-17 00:56:00+01:00  1054.805236  1054.805236  1054.187307  1049.603777
2025-05-17 00:57:00+01:00  1053.775354  1055.833509  1053.775354  1058.827009
2025-05-17 00:58:00+01:00  1054.804431  1054.804431  1054.186503  1046.453387
2025-05-17 00:59:00+01:00  1051.714787  1052.331267  1051.714787  1049.510137

🤝 Contributing

Feel free to open issues or submit pull requests if you find bugs or want to improve the package - Junaid :)

📄 License

MIT License. See the LICENSE file for full details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

afterquote-0.2.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

afterquote-0.2.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file afterquote-0.2.1.tar.gz.

File metadata

  • Download URL: afterquote-0.2.1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for afterquote-0.2.1.tar.gz
Algorithm Hash digest
SHA256 8266cbe76d376e99a09e2cc68674a8e6fbc83607b16383a528fe91ce8069ed0e
MD5 49d0ae5f9fd8f386ac9c07277ee4558a
BLAKE2b-256 b5a977b1fa42fdebb235349824e8e21e7836eb5005bb03b4fcfeeb37052855ac

See more details on using hashes here.

File details

Details for the file afterquote-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: afterquote-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for afterquote-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 309a5ee6bcd9e592c1ec6672da99f5de91f0a0a6724606431cbdf0e097846e2c
MD5 f5dc13b71e60cdb5712045ce7ae59df3
BLAKE2b-256 4a56c307bc8e9153c2191ac3c052382843786fa738da111a147ebf11d291c6ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page