Saravanan666/pypi-org huggingface dataset:
Package: quant-alchemy
Table of contentsTable of contentsIntroductionInstallationDependenciesUsageContributingIntroductionQuant Alchemyprovide aInstallationThis package requires some dependencies to be installed.DependenciespandasnumpyscipyTo install the package, run the following command in your terminal.pipinstallquant_alchemyTo install all the dependencies, run the following command in your terminal.pipinstall-rrequirements.txtUsageA simple example of how to use the package is shown below.fromquant_alchemyimportTimeseries,Portfolio"""Suppose we have a dataframe with the following columns:- date: date of the stock price- close: opening price of the stock"""df=pd.read_csv("data/stock.csv")# Create a timeseries objectts=Timeseries(df)# To see all the methods availableprint([tfortindir(ts)ifnott.startswith('__')])# To see how to use a methodhelp(ts.annualized_return)ContributingFor any bug reports or recommendations, please visit ourissue trackerand create a new issue. If you're reporting a bug, it would be great if you can provide a minimal reproducible example.Thank you for your contribution!
Package: quantaq-cli
QuantAQ Command Line Interface (CLI)This package provides easy-to-use tools to munge data associated with QuantAQ air quality sensors.DocumentationFull documentation can be foundhere.DependenciesThis tool is built for Python 3.6.1+ and has the following key dependenciespython = ">=3.8,<4.0"
pandas = ">=1.0.4"More details can be found in thepyproject.tomlfile at the base of this repository.InstallationInstall from PyPI$pipinstallquantaq-cliIt can also be added as a dependency using Poetry$poetryaddquantaq-cliIf you would like to install locally, you can clone the repository and install directly with Poetry$poetryinstallTestingAll tests are automagically run via GitHub actions and reports are uploaded directly to codecov. For results to these runs, click on the badges at the top of this file. In addition, you can run tests locally$poetryrunpytest--cov=./--cov-report=xml-rPDevelopmentDevelopment takes place on GitHub. Issues and bugs can be submitted and tracked via theGitHub Issue Trackerfor this repository.LicenseCopyright © 2020-2023 QuantAQ, Inc.Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package: quantastica-qconvert
Quantum programming language converterConvert between quantum programming languagesMore goodies athttps://quantastica.comSupported languagesPython version ofquantastica-qconvertcurrently supports only:Qobj to pyQuilQobj to QubitToasterMore formats will be added soon.Until then, for more formats see:JavaScript version as command line tool:https://www.npmjs.com/package/q-convertJavaScript version as online web page:https://quantum-circuit.com/qconvertUsagefromquantasticaimportqconvertsource_code=...options={}converted=qconvert.convert(qconvert.Format.QOBJ,source_code,qconvert.Format.PYQUIL,options)print(converted)Detailsconvert(source_format, source_dict, dest_format, options)source_formatFormat.QOBJdest_formatFormat.PYQUILFormat.TOASTERoptionsDict:For all destination formats:all_experimentsFalse(default) only first experiment will be converted and returned as stringTrueall experiments form Qobj will be converted and returned as list of strings.create_exec_codeTrue(default) generated source code will contain command which executes circuit e.g.qc.run()shots(integer) ifcreate_exec_codeisTruethen generated code will performshotsnumber of samplesForPYQUILdestination:latticename of the backend (e.g. for pyQuil destination"Aspen-7-28Q-A").If ommited then "Nq-qvm" will be generated whereNis number fo qubits in the circuit.Special values:"qasm_simulator"will produce "Nq-qvm" backend"statevector_simulator"will produce WaveFunction simulator codeas_qvm(defaultFalse) ifTrueQVM will mimic QPU specified by lattice argument.ForTOASTERdestination:No options yetThat's it. Enjoy! :)
Package: quantastica-qiskit-forest
Forest backend for QiskitAllows runningQiskitcode onRigettisimulators and quantum computers by changing only two lines of your Qiskit code.More goodies athttps://quantastica.comInstallpip install quantastica-qiskit-forestUsageImportForestBackendinto your Qiskit code:from quantastica.qiskit_forest import ForestBackendAnd replaceAer.get_backendwithForestBackend.get_backend.ExamplefromqiskitimportQuantumRegister,ClassicalRegisterfromqiskitimportQuantumCircuit,execute,Aer# Import ForestBackend:fromquantastica.qiskit_forestimportForestBackendqc=QuantumCircuit()q=QuantumRegister(2,"q")c=ClassicalRegister(2,"c")qc.add_register(q)qc.add_register(c)qc.h(q[0])qc.cx(q[0],q[1])qc.measure(q[0],c[0])qc.measure(q[1],c[1])# Instead:#backend = Aer.get_backend("qasm_simulator")# Use:backend=ForestBackend.get_backend("qasm_simulator")# OR:# backend = ForestBackend.get_backend("statevector_simulator")# backend = ForestBackend.get_backend("Aspen-7-28Q-A")# backend = ForestBackend.get_backend("Aspen-7-28Q-A", as_qvm=True)# ...# To speed things up a little bit qiskit's optimization can be disabled# by setting optimization_level to 0 like following:# job = execute(qc, backend=backend, optimization_level=0)job=execute(qc,backend=backend)job_result=job.result()print(job_result.get_counts(qc))PrerequisitesRunning on your local Rigetti simulatorYou need to installRigetti Forest SDKand make sure thatquilccompiler andqvmsimulator are running:Open new terminal and run:quilc -SAnd in one more new terminal run:qvm -S -cRunning on Rigetti quantum computerYou need to get access to RigettiQuantum Cloud Services(QCS)In your Quantum Machine Image (QMI) install this package and QiskitReserve aQPU latticeRun your code via QMI terminal or Jupyter notebook served by your QMIDetailsSyntaxForestBackend.get_backend(backend_name = None, as_qvm = False)Argumentsbackend_namecan be:any valid Rigetti lattice nameOR:qasm_simulatorwill be sent to QVM asNq-qvm(whereNis number of qubits in the circuit)statevector_simulatorwill be executed asWavefunctionSimulator.wavefunction()If backend name is not provided then it will act asqasm_simulatoras_qvmboolean:False(default)True: if backend_name is QPU lattice name, then code will execute on QVM which will mimic QPUThat's it. Enjoy! :)
Package: quantatrisk-tradetool
Internal toolingFree software: BSD 2-Clause LicenseInstallationpip install quantatrisk-tradetoolYou can also install the in-development version with:pip install git+ssh://git@quantatrisk_tradetool/pablomasior/python-quantatrisk_tradetool.git@mainDocumentationhttps://python-quantatrisk_tradetool.readthedocs.io/DevelopmentTo run all the tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.0.0 (2022-03-31)First release on PyPI.
Package: quantbullet
quantbulletquantbulletis a toolkit designed for streamlined quantitative analysis in finance. The goals for this package are:To provide a practical set of tools for prototyping quantitative research ideas.To integrate and test contemporary research findings, primarily from academic sources, ensuring they're actionable.While I initially developed this package for my own needs, I intend to maintain it consistently. If it assists others in their endeavors, I consider that a success.Installation$pipinstallquantbulletUsageStatistical Jump Models. Seethis notebookfor an example. Statistical jump models are a type of regime-switching model that applies clustering algorithms to temporal financial data, explicitly penalizing jumps between different financial regimes to capture true persistence in underlying regime-switching processes.ContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licensequantbulletwas created by Yiming Zhang. It is licensed under the terms of the MIT license.CreditsThis project developement is generously supported by JetBrains softwares with their Open Source development license.quantbulletwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.Python Packagesis an excellent resource for learning how to create and publish Python packages.
Package: quantclean
Quantclean 🧹"Make it cleaner, make it leaner"Already used by several people working in the quant and finance industries, Quantclean is the all-in-one tool that will help you to reformat your dataset and clean it.Quantclean is a program thatreformatsevery financial dataset toUS Equity TradeBar(Quantconnect format)We all faced the problem of reformating or data to a standard. Manual data cleaning is clearly boring and take time. Quantclean is here to help you and to make you life easier as a quant.Works great with datas from Quandl, Algoseek, Alpha Vantage, yfinance, and many other more...Few things you may want to know before getting started 🍉Even if you don't have an open, close, volume, high, low, date column, quantclean will create a blank column for it. No problem!The dataframe generated will look like this if you have a date and time column (or if both are on the same column):DateOpenHighLowCloseVolume20131001 09:00644800064480006448000644800090Date - String date "YYYYMMDD HH:MM" in the timezone of the data format.Open - Deci-cents Open Price for TradeBar.High - Deci-cents High Price for TradeBar.Low - Deci-cents Low Price for TradeBar.Close - Deci-cents Close Price for TradeBar.Volume - Number of shares traded in this TradeBar.You can also get something like that if use thesweeper_dashfunction instead ofsweeperDateOpenHighLowCloseVolume2013-10-01 09:00:00644800064480006448000644800090As you can see, the date format is YYYY-MM-DD and no more YYYYMMDD.If you just have a date column (e.g : something like YYYY-MM-DD), it will look like this:DateOpenHighLowCloseVolume20131001644800064480006448000644800090You can also use thesweeper_dashfunction here.How to use it? 🚀First, download the quantclean.py file in the folder where you are workingNote : I took this data from Quandl, your dataset doesn't have to look like this one necessarily, quantclean adapts to your dataset as well as possiblefrom quantclean import sweeper

df = pd.read_csv('AS-N100.csv')
df_df = sweeper(df)
_dfOutput:Now, you may not be happy of this date colum which is presented in the YYYYMMDD format and maybe be prefer YYYY-MM-DD.In that case do :df_dash = sweeper_dash(df)
df_dashOutput:ContributionIf you have some suggestions or improvements don't hesitate to create an issue or make a pull request. Any help is welcome!
Package: quantconnect-stubs
QuantConnect StubsThis package contains type stubs for QuantConnect'sLeanalgorithmic trading engine and for parts of the .NET library that are used by Lean.These stubs can be used by editors to provide type-aware features like autocomplete and auto-imports in QuantConnect strategies written in Python.After installing the stubs, you can copy the following line to the top of every Python file to have the same imports as the ones that are added by default in the cloud:fromAlgorithmImportsimport*This line importsall common QuantConnect membersand provides autocomplete for them.
Package: quant-data-sdk
QuantData sdkauth tokenfor access write to support@quantdata.sciencesimple usage:get companies:

    api = QuantumDataApi(API_TOKEN)
    response = api.get_companies()


get quotations:

    api = QuantumDataApi(API_TOKEN)
    response = api.get_quotations_as_df("KGHM", date_from="2015-01-01", date_to="2021-01-01", stock="GPW")

get reports:

    api = QuantumDataApi(API_TOKEN)
    response = api.get_reports("KGHM")
Package: quantdsl
Quant DSL is a functional programming language for modelling derivative instruments.At the heart of Quant DSL is a set of built-in elements (e.g. “Market”, “Choice”, “Wait”) that encapsulate maths used in finance and trading (i.e. models of market dynamics, the least-squares Monte Carlo approach, time value of money calculations) and which can be composed into executable expressions of value.User defined functions are supported, and can be used to generate massive expressions. The syntax of Quant DSL expressions has been formally defined, and the semantic model is supported with mathematical proofs. The Python package quantdsl is an implementation in Python of the Quant DSL syntax and semantics.An extensiveREADME file is available on GitHub.
Package: quantecon
QuantEcon.pyA high performance, open source Python code library for economicsfromquantecon.markovimportDiscreteDPaiyagari_ddp=DiscreteDP(R,Q,beta)results=aiyagari_ddp.solve(method='policy_iteration')InstallationBefore installingquanteconwe recommend you install theAnacondaPython distribution, which includes a full suite of scientific python tools.Note:quanteconis now only supporting Python version 3.5+. This is mainly to allow code to be written taking full advantage of new features such as using the@symbol for matrix multiplication. Therefore please install the latest Python 3 Anaconda distribution.Next you can install quantecon by opening a terminal prompt and typingpip install quanteconUsageOncequanteconhas been installed you should be able to import it as follows:importquanteconasqeYou can check the version by runningprint(qe.__version__)If your version is below what’s available onPyPIthen it is time to upgrade. This can be done by runningpip install --upgrade quanteconExamples and Sample CodeMany examples of QuantEcon.py in action can be found atQuantitative Economics. See also theDocumentationNotebook galleryQuantEcon.py is supported financially by theAlfred P. Sloan Foundationand is part of theQuantEcon organization.Downloading thequanteconRepositoryAn alternative is to download the sourcecode of thequanteconpackage and install it manually fromthe github repository. For example, if you have git installed typegit clone https://github.com/QuantEcon/QuantEcon.pyOnce you have downloaded the source files then the package can be installed by runningpip install flit
flit install(To learn the basics about setting up Git seethis link.)
Package: quantecon_book_networks
quantecon-book-networksPython Package forhttps://networks.quantecon.org(Economic Networks)Releases2023-Dec-06: v1.1DEPS: Add POTS as a dependency to support the lectures and enable automatic installation of dependencies2023-Nov-20: v1.0This is the firstv1release to support the publication of the bookPackage BuilderThis package usesflitto build and publish updates to PyPITo update the package:Make the necessary updates tomain(via PR or push)Useflit installto install it for local testingTo publish useflit publish:warning: You will need to have mantainer priviledges
on PyPI forquantecon_book_networkspackage.The configuration forflitis found inpyproject.toml
Package: quantecon-book-theme
quantecon-book-themeA Jupyter Book Theme for QuantEcon Book Style ProjectsUsageTo use this theme inJupyter Book:Install the themepip install git+https://github.com/QuantEcon/quantecon-book-theme.gitAdd the theme to your_config.ymlfile:sphinx:config:html_theme:quantecon_book_themeUpdating Fixtures for TestsUpdating test regression files on layout changesIt is advisable to update the test files for file regression checks when releavant layout files change.For example, at present we have a sidebar file-regression check to validate html across tests.
The file which it compares against istests/test_build/test_build_book.html.If updating the sidebar html, then one of the easier steps to update this test file is:Delete the filetests/test_build/test_build_book.html.Runpytestin your command line, which will then generate a new file. Check if the file is at par with your expectations, contains elements which you added/modified.Now future pytests will test against this file, and the subsequent tests should pass.Contributing GuideThe docs for the contributing guide of this repository:https://github.com/QuantEcon/quantecon-book-theme/blob/master/docs/contributing/index.md
Package: quantel
Official Python Library for the Quantel Finance APIWebsite:quantel.ioDocumentation:quantel.io/docs/pythonBlog Posts:The Most Powerful Python Finance Library Youâ€™ve Never Heard OfSource Code:ratherbland/QuantelGet API Key:links.quantel.io/getstartedTable of ContentsOverviewSupport For Major Exchanges.SetupRequirementsInstallationExamplesBasic ExampleMultiple Symbol ExampleInternational ExampleAsynchronous ExampleLicenseContactOverviewQuantel is a powerful financial data and insights API. It provides easy access to world-class financial information. Quantel goes beyond just financial statements, giving users valuable information like insider transactions, major shareholder transactions, share ownership, peers, and so much more.Some features of Quantel:Fast: Data is retrieved through API endpoints instead of web scraping. Additionally, asynchronous requests can be utilized with simple configurationSimple: Data for multiple symbols can be retrieved with simple one-linersLightweight: Minimal reliance on third party packagesPowerful: 40+ years of historical financial data for almost 25k thousand companies across the globeSupport For Major Exchanges.AmericasNASDAQNew York Stock Exchange (NYSE)Toronto Stock Exchange (TSX)Asia PacificAustralian Stock Exchange (ASX)Hong Kong Stock Exchange (HKEX)National Indian Stock Exchange (NSE)EuropeGerman Electronic Exchange (XETRA)EuroNext (ENX)London Stock Exchange (LSE)Moscow Stock Exchange (MOEX)Oslo Stock Exchange (OSE)Swiss Stock Exchange (SIX)SetupRequirementsPython 3.6+Requests- The elegant and simple HTTP library for Python, built for human beings.Aiohttp- Asynchronous HTTP Client/Server for asyncio and Python.InstallationpipinstallquantelExamplesBasic ExamplefromquantelimportQuantel# Authenticate with the APIqt=Quantel(api_key="<quantel-api-key>")# Instantiate the ticker classgoog=qt.ticker('goog')# Retrieve company profilegoog.profile()Multiple Symbol ExampleThetickerclass also makes it easy to retrieve data for a list of symbols with the same API. Simply pass a list of symbols as the argument to thetickerclass.fromquantelimportQuantelqt=Quantel(api_key="<quantel-api-key>")symbols=['fb','aapl','amzn','nflx','goog']faang=qt.ticker(symbols)faang.profile()International ExampleQuantel supports the majority of international exchanges. Read more about what data is supported by which exchanges atquantel.io/docs/fromquantelimportQuantelqt=Quantel(api_key="<quantel-api-key>")symbols=['DHER.DE','CBA.AX','DNB.OL','NESN.SW','ULVR.L','SHOP.TO','EDF.PA',' RELIANCE.NS']international=qt.ticker(symbols)international.balance_sheet()Asynchronous ExampleIt really is that simple. Setasynchronous=Truewhen instantiating the ticker class.fromquantelimportQuantelqt=Quantel(api_key="<quantel-api-key>")goog=qt.ticker('goog',asynchronous=True)goog.profile()LicenseThis project is licensed under the terms of the MIT license.ContactQuestions can be raised directly viaguy@quantel.io
Package: quantestpy
QuantestPyQuantestPy is an unit testing framework for quantum computing programs.InstallationWe encourage installing QuantestPy via the pip tool(a python package manager).
The following command installs the core QuantestPy component.pipinstallquantestpyTesting approaches with QuantestPyYou insert assert methods in your source codes.# your_source_code.pyimportquantestpyasqpstate_vec=[0.7072+0j,0,0,0.7072+0j]# check that the state vector is normalized.qp.assert_normalized_state_vector(state_vector_subject_to_test=state_vec)...QuantestPy provides several assert methods to check for and report failures. The following table lists the available methods:MethodChecks thatassert_normalized_state_vector(state_vec)state_vec is normalizedassert_equivalent_state_vectors(state_vec_a, state_vec_b)state_vec_a == state_vec_bassert_unitary_operator(operator)operator is unitaryassert_equivalent_operators(operator_a, operator_b)operator_a == operator_bassert_circuit_equivalent_to_operator(circuit, operator)circuit == operatorassert_qubit_reset_to_zero_state(circuit, qubits)qubits in circuit are 0 statesassert_ancilla_reset(circuit, ancilla_qubits)ancilla_qubits in circuit are always 0 statesassert_equivalent_circuits(circuit_a, circuit_b)circuit_a == circuit_bassert_unary_iteration(circuit, input_to_output)circuit is the expected indexed operationassert_circuit_equivalent_to_output_qubit_state(circuit, input_to_output)circuit's output for the input is as expectedThe hyperlinks bring you to details of the methods.LicenseApache License 2.0
Package: quant-experiment
FeaturesRealtime stock and option data:You can easily extract the latest stock and option informationOption characteristics:Library provides you with option relevant characteristics based on Black-Scholes modelInstallationInstalling Withpip$pipinstallquant_experimentQuickstartData is retrieved from Alpha Vantage API free services, make sure initializing a key variable firstkey="YOUR_API_KEY"Operation on stock datafromquant_experimentimportfinproductsstock_demo=finproducts.Stock('AAPL',key)stock_demo.price#return realtime stock pricestock_demo.latestTradingDay#lastest trading daystock_demo.volume#volumeOperation on option datafromquant_experimentimportfinproductsoption_demo=finproducts.VanillaOption('AAPL',21,6,2019,180,'calls')#call option with expiration date 2019-06-21 and strike price 180option_demo.option_info()Giving us output as:Return option property based on Black-Scholesfromquant_experimentimportfinproductsoption_demo=finproducts.VanillaOption('AAPL',21,6,2019,180,'calls')option_demo.BS_Info(key)#return implied volatility by defaultoption_demo.BS_Info(key,'greeks')#return delta, gamma, vega, theta and rhoContributingAll contributions are welcome.