Saravanan666/pypi-org huggingface dataset:
Package: econkit
EconkitIntroductionEconkit is a comprehensive Python library designed for economic and financial data analysis. It offers a wide range of functionalities, from descriptive statistics to advanced portfolio analysis, making it a valuable tool for economists, financial analysts, and researchers.InstallationpipinstalleconkitFeaturesEconkit provides the following functionalities:Descriptives FunctionPerform comprehensive statistical analysis on a DataFrame, computing various descriptive statistics for each numeric column.Correlation FunctionCompute correlation matrices between numerical columns in a DataFrame. Supports Pearson and Spearman methods and provides significance levels.Stock FunctionDownload and process stock data from Yahoo Finance, including the computation of percentage growth of the Adjusted Close price.Table FunctionFacilitate the comparison of a specific column across multiple DataFrames by extracting and combining them into a new DataFrame.Weights FunctionGenerate portfolio weights for a collection of stocks, creating multiple portfolios with full weight in one stock and additional portfolios with random weights.Portfolios FunctionCalculate the expected return and volatility of various portfolios based on their weight allocations and stock returns.Frontier Simple FunctionVisualize the mean-variance frontier from portfolio data and highlight the portfolio with minimum volatility.UsageBelow are basic usage examples for each function in Econkit:Descriptives# result = descriptives(your_dataframe)# print(result)Correlation# correlation(your_dataframe, method="Pearson", p="F")Stock# stock_data = stock("ticker_symbol", "start_date", "end_date", "interval")Table# combined_df = table("column_name", dataframe1, dataframe2, ...)# print(combined_df)Weights# weights_df = weights(stocks, extra)Portfolios# portfolio_metrics = portfolios(weights_df, returns_df, 'daily')# print(portfolio_metrics)Frontier Simple# frontier_simple(your_dataframe)ContributingContributions to the Econkit library are welcome. Please refer to the contributing guidelines for more information.LicenseEconkit is licensed under the MIT License.ContactFor inquiries or support, please contactcontact@stefanstavrianos.eu.
Package: econ-layers
Pytorch Layers for Economics ApplicationsPytorchDocumentation:https://HighDimensionalEconLab.github.io/econ_layersFeaturesExponential layerFlexible multi-layer neural network with optional nonlinear last layerAffine rescaling of output by an inputDevelopmentTo publish a new relase to pypi,Ensure that the CI is passingModifysetup.pyto increment the minor version number, or a major version number once API stability is enforcedChoose the "Releases" on the github page, then "Draft a new relase"Click on "Choose a tag" and then type a new release tag with thevfollowed by the version number you modified to be consistentAfter you choose "Publish Release" it will automatically push to pypi, and you can change compatability bounds in downstream packages as required.CreditsThis package was created withCookiecutterand thegiswqs/pypackageproject template.
Package: econlib
EconLibEconLibincludes econometric models and methods covered in Green (2011) such as OLS, MLE, GMM, etc.
This package is written with the most basic python operations and packages and is intended to be as easy to understand as possible.
It is just to showcase the numerical implementation of the econometric methods and is not suitable for computational demanding tasks.
It is intended to be easily variability and to act as a starting point for implementing and testing new ideas and methods in econometrics.
Package: econnect
EConnect-moduleEsto es un paquete de Python que permite a los desarrolladores cubanos interactuar de manera facil y sencilla con el Portal Cautivo de Etecsa.CaracteristicasVerificación de conexión.Inicio de Sesión.Guardado de datos para el cierre de manera local.Obtención de tiempo disponible.Cierre de sesión.Cierre de sesion de forma local con los datos guardados por el usuarioRepositorio del proyecto aquipara los que se interesen en el código.Documentacion del paquetepara una ayuda de como usar el paquete correctamente.
Package: econnlp
econnlp: An Econ Approach to NLPPlease contact the authors below if you find any bugs or have any suggestions for improvement. Thank you!Author: Nicolaj Søndergaard Mühlbach (n.muhlbach at gmail dot com, muhlbach at mit dot edu)Code dependenciesThis code has the following dependencies:Python >=3.6pandas >=1.3InstallationUsage# Coming soon
Package: economic-agents
EconomicAgentsThis is an implementation and Python package for the paperLarge Language Models as Simulated Economic Agents: What Can We Learn from Homo Silicus?. This Python package enables you to run all four simulations from the paper.If you like this work, consider joining our.Installationpipinstalleconomic_agentsUsageCharness Rabinfromeconomic_agentsimportCharnessRabincharness_rabin=CharnessRabin(api_key="openai_key",model="gpt-3.5-turbo",personality=1,image_path="folder/charness_rabin",logging=True)results=charness_rabin.play()charness_rabin.create_plot(results)The personality argument determines an option from the following personalities from the original paper:"You only care about fairness between players",
"You only care about your own pay-off",
"You only care about the total pay-off of both players",
" "Result:Hortonfromeconomic_agentsimportHortonhorton=Horton(api_key="openai_key",model="gpt-3.5-turbo",image_path="folder/horton",logging=True)results=horton.play()horton.create_plot(results)Result:Kahnemanfromeconomic_agentsimportKahnemankahneman=Kahneman(api_key="openai_key",model="gpt-3.5-turbo",image_path="results/kahneman",logging=True)results=kahneman.play()kahneman.create_plot(results)Result:Zeckhauserfromeconomic_agentsimportZeckhauserzeckhauser=Zeckhauser(api_key="openai_key",model="gpt-3.5-turbo",image_path="results/zeckhauser",logging=True)results=zeckhauser.play()zeckhauser.create_plot(results)Result:TodoCreate a Gradio demoMake experiments possible with dynamic inputsImprove error handling / code refactoringAdd support for other modelsCitation@article{horton2023large,title={Large Language Models as Simulated Economic Agents: What Can We Learn from Homo Silicus?},author={Horton, John J},journal={arXiv preprint arXiv:2301.07543},year={2023}}
Package: economic-complexity
This package contains functions to calculate Economic Complexity indicators.The functions handle the data throughpandas.DataFrameobjects.InstallationWe recommend the use ofpoetry, to resolve the best version of the dependencies that works with your current project.$poetryaddeconomic-complexityFor the time being the library is compatible with both pandas and polars, though we intend to migrate to polars completely. Specify the package you want to use as backend as an extra at installation:$poetryaddeconomic-complexity[pandas]$# or$poetryaddeconomic-complexity[polars]TutorialWe havea brief Tutorial, using data from the Observatory of Economic Complexity, to get started on how to use the basic functions of this package.More complex functions use the resulting dataframes of the basic functions as arguments.ReferencesHidalgo, César A. (2021). Economic complexity theory and applications.Nature Reviews Physics, 3(2), 92–113.https://doi.org/10.1038/s42254-020-00275-1Catalán, P., Navarrete, C., & Figueroa, F. (2020). The scientific and technological cross-space: Is technological diversification driven by scientific endogenous capacity?Research Policy, 104016, 104016.https://doi.org/10.1016/j.respol.2020.104016Hidalgo, César A., & Hausmann, R. (2009). The building blocks of economic complexity.Proceedings of the National Academy of Sciences of the United States of America, 106(26), 10570–10575.https://doi.org/10.1073/pnas.0900943106Hidalgo, C. A., Klinger, B., Barabási, A.-L., & Hausmann, R. (2007). The product space conditions the development of nations.Science (New York, N.Y.), 317(5837), 482–487.https://doi.org/10.1126/science.1144581Hartmann, D., Guevara, M. R., Jara-Figueroa, C., Aristarán, M., & Hidalgo, C. A. (2017). Linking Economic Complexity, Institutions, and Income Inequality.World Development, 93, 75–93.https://doi.org/10.1016/j.worlddev.2016.12.020Romero, J. P., & Gramkow, C. (2021). Economic complexity and greenhouse gas emissions.World Development, 139, 105317.https://doi.org/10.1016/j.worlddev.2020.105317Bahar, D., Hausmann, R., Hidalgo, C. A. (2014). Neighbors and the evolution of the comparative advantage of nations: Evidence of international knowledge diffusion?.Journal of International Economics, 92, 111-123.http://dx.doi.org/10.1016/j.jinteco.2013.11.001© 2022Datawheel, LLC.This project is licensed underMIT.
Package: economics
economicsprovides a toolkit with economical computations based on
data fromdata.okfn.org.FeaturesCPIInflation (based on CPI by default)RequirementsdatapackageCPI>> from economics import CPI
>> import datetime
>>
>> # Create a new CPI instance
>> cpi = CPI()
>>
>> # Get CPI for Iceland in 2007
>> cpi.get(datetime.date(2007,1,1), 'Iceland')
CPI(date=datetime.date(2007, 1, 1), value=112.07753358)
>>
>> # We're going to work with Iceland so set default country
>> # (we're creating a new instance but the country variable can be set)
>> iceland = CPI(country='Iceland')
>>
>> # Get CPI in 2012 (not in the data)
>> iceland.get(datetime.date(2012,1,1))
...
KeyError: 'Date 2012-01-01 not found in data'
>>
>> # Get the closest CPI value sintead
>> iceland.closest(datetime.date(2012,1,1))
CPI(date=datetime.date(2011, 1, 1), value=155.03663004)Inflation>> from economics import Inflation
>> import datetime
>>
>> # Create a new Inflation instance
>> inflation = Inflation()
>>
>> # How many US $ would I need in 2011 to pay for what cost $5 in 2007
>> inflation.inflate(5, datetime.date(2011,1,1), datetime.date(2007,1,1), 'United States')
5.424340332378624
>>
>> # We can also set the reference year and the country
>> usa_2007 = Inflation(reference=datetime.date(2007,1,1), country='United States')
>>
>> # Get the inflation for 2007 in the United States
>> usa_2007.get(datetime.date(2011,1,1))
Inflation(factor=1.0848680664757249, value=0.08486806647572484)Licenseeconomics is available under the GNU General Public License, version 3.
See LICENCE for more details.
Package: econompy
EconomPy - The Econometric Python LibraryThe motivation behind the EconomPy library is to provide a set of tools for econometric analysis in Python. Instead of using R (Studio) or Stata for econometric analysis, the goal is to provide a Python alternative.The EconomPy library is a collection of econometric functions and classes written in Python. The library is designed to be used in conjunction with thePandaslibrary.InstallationFor the latest stable version, install fromPyPi:# Create a virtual environmentpython-mvenv.venv# Activate the virtual environmentsource.venv/bin/activate# Install the package from PyPipipinstalleconompyUsageimporteconompyasepDevelopmentTo contribute to the development of EconomPy, clone the repository and install the development dependencies.Install the Development Dependencies# Clone the repositorygitclonehttps://github.com/malill/econompy.git# Create a virtual environmentpython-mvenv.venv# Install the development dependenciespipinstall-rrequirements-dev.txt# Install the package in editable modepipinstall-e.Use pre-commit hooksThe pre-commit hooks are used to ensure that the code is formatted correctly and that the tests pass before committing the code.# Install the pre-commit packagepre-commitinstall# (To locally) Run the pre-commit hookspre-commitrun--all-filesRun Code CoverageYou can test the code coverage by running the following command:# Run the code coveragepytest--cov=econompy--cov-report=htmlThis will generate a HTML report in thehtmlcovfolder. Inspect the report by opening theindex.htmlfile in your browser.
Package: economynlp
Python Narrative packagespoliticsnlpfor Politicsreligionnlpfor Religionlawnlpfor Laweconomynlpfor Economycpanlpfor Businessmilitarynlpfor Militarypython narrating economyFor detailed installation instructions, see thedocumentation.pipinstalleconomynlpimporteconomynlpasepExampleInformation Asymmetryinfo=p.AsymmetricInformation(sender="investor",receiver="company_A",message="I am very interested in investing in your business",hidden_information="I have a limited budget")info.get_advantage()Module:ModuleContentAbnormalWinner Curse，BubbleBeliefRational Beliefs，Rational Expectations，Belief DistortionsCognitiveBlackSwan，Grey Rhino，Herd Behavior，Invisible Hand，Revolving Door，Tunneling，Putting All Your Eggs in One BasketCultureEntrepreneurship，Craftsmanship，Business PhilosophyEnvironmentEconomic Environment，Industry Environment，Credit Environment，Market EnvironmentGameInformationSignal，Speculative Information，Asymmetric InformationIncentiveMarketCommodity，Goods，Market，Market Failure，Market AccessPolicyFiscal Policy，Fiscal Stimulus，Industrial Policy，Macroprudential，Monetary Policy，Tobin TaxesStructureMonopoly，Oligopoly，PerfectlyCompetitiveSystemDigital Economy，Physical Economy，Market Economy，Planned  EconomyCheck out:https://cpanlp.com
Package: econoplots
DescriptionThis project helps create Matplotlib plots in the style ofThe Economist. Only some plot styles are supported (line plots are the only style that works right now) and there are some stylistic differences fromThe Economistfor the sake of convenience/laziness.Users GuideInstall fonts (see below) before using any functions.The main function you will use isconverter.convert2Econo(), which takes a MatplotlibAxesand returns andAxesthat is formatted nicely.First generate a MatplotlibAxesin any way you like, then pass it intoconvert2Econo()-- then presto you have an Econoplot!How to install fontsCopy .ttf file here: "~\.local\share\fonts"Delete the matplotlib cache here (it will automatically be recreated): "~\.cache\matplotlib"
Package: econpizza
Solve nonlinear heterogeneous agent models using automatic differentiationEconpizza is a framework to solve and simulatefully nonlinearperfect foresight models, with or without heterogeneous agents.
The package implements the solution method proposed inHANK on Speed: Robust Nonlinear Solutions using Automatic Differentiation(Gregor Boehl, 2023, SSRN No. 4433585).
It allows to specify and solve nonlinear macroeconomic models quickly in a simple, high-level fashion and provides generic and robust routines for steady state search.The package can solve nonlinear models with heterogeneous agents, such as HANK models with one or two assets and portfolio choice. Steady state and nonlinear impulse responses (including, e.g., the ELB) can typically be found within a few seconds.
The method extends theSequence-Space Jacobianmethod (Auclert et al., 2022, ECMA) to fully nonlinear heterogeneous agent models models by iteratively usingJacobian-vector producsto approximate the solution to the linear system of equations associated with each Newton iteration. This not only allows to study the dynamics of aggregate variables, but also the complete nonlinear transition dynamics of the cross-sectional distribution of assets and disaggregated objects.To solve models with representative agents a shooting methods similar to Laffargue (1990), Boucekkine (1995) and Juillard (1996) is implemented. It is faster and more reliable than the extended path method in dynare due to the use of automatic differentiation for the efficient jacobian decompositions during each Newton-step. Nonlinear perfect-foresight transition dynamics can - even for large-scale nonlinear models with several occassionally binding constraints - be computed in less than a second.The package builds heavily onautomatic differentiationviaJAX.DocumentationInstalling therepository versionfrom PyPi is as simple as typingpipinstalleconpizzain your terminal or Anaconda Prompt.Guides and tutorials are provided on ReadTheDocs:User guideQuickstart tutorialCitation@article{boehl2023goodpizza,title={HANK on Speed: Robust Nonlinear Solutions using Automatic Differentiation},author={Boehl, Gregor},journal={Available at SSRN 4433585},year={2023}}
Package: econsieve
Apart from the smoother (npas) and TEnKF, I stole quite some of the code from these two projects:https://github.com/rlabbe/filterpyhttps://github.com/pykalman/pykalmanThey deserve most of the merits. I just made everything look way more complicated. Sometimesfilterpywas more efficient, sometimespykalman. Unfortunately thepykalmanproject is orphaned. I tweaked something here and there:treating numerical errors in the UKF covariance matrix by looking for the nearest positive semi-definite matrixeliminating identical sigma points (yields speedup assuming that evaluation of each point is costly)extracting functions from classes and compile them using the @njit flag (speedup)major cleanupNPAS is built from scratch. I barely did any testing as a standalone filter and just always used it in combination with the ‘pydsge’, where it works very well.Some very rudimentary documentationcan be found here.Installation withpipBe sure that you are on Python 3.x. Then it’s as simple as:pipinstalleconsieveInstallation of bleeding-edge version usinggitFirst installgit. Linux users just use their respective repos.Windows users probably use anaconda and can docondainstall-canacondagitin the conda shellas they kindly tell us here. Otherwise you can probablyget it here.Then you can simply dopipinstallgit+https://github.com/gboehl/econsieveIf you run it and it complains about missing packages, please let me know so that I can update thesetup.py!Alternatively you can clone the repository and then from within the cloned folder run (Windows user from the Anaconda Prompt):pipinstall.UpdatingThe package is updated very frequently (find the history of latest commitshere). I hence recommend pulling and reinstalling whenever something is not working right. Run:pipinstall--upgradeeconsieveCitationpydsgeis developed by Gregor Boehl to simulate, filter, and estimate DSGE models with the zero lower bound on nominal interest rates in various applications (see [gregorboehl.com](https://gregorboehl.com) for research papers using the package). Please cite it with:@TechReport{boehl2022meth,
  author={Boehl, Gregor and Strobel, Felix},
  title={{Estimation of DSGE Models with the Effective Lower Bound}},
  year=2022,
  type     ={CRC 224 Discussion Papers},
  institution={University of Bonn and University of Mannheim, Germany}}We appreciate citations forpydsgebecause it helps us to find out how people have
been using the package and it motivates further work.
Package: econuker
EcoNukerEcoNuker is a Python library for interacting with the EcoNuker API, which provides routes for items, servers, and more!The base URLs are:https://econuker.xyz/apiandhttps://beta.econuker.xyz/api(beta version)PyPi:https://pypi.org/project/econuker/InstallationYou can install the EcoNuker-API library using pip:pip install econukerUsageInitialize a Client or AsyncClient class. Make sure to passauth_tokenandbetaif needed.You can now use the client to make requests.Example# Python ExamplefromeconukerimportClientbeta=True# Falseauthtoken=None# "your auth token here"if__name__=="__main__":client=Client(auth_token=authtoken,beta=beta)status=client.status()print(status.name)Async Example# Python Async ExamplefromeconukerimportAsyncClientbeta=True# Falseauthtoken=None# "your auth token here"if__name__=="__main__":client=AsyncClient(auth_token=authtoken,beta=beta)asyncdefasyncfunction():status=awaitclient.status()print(status.name)returnstatusasyncio.run(asyncfunction())Downtime Notifier Example# Python Downtime Notifier ExampleimporteconukerfromeconukerimportAsyncClientbeta=True# get notified about downtime of our Beta bot.authtoken=Nonedown=Falseimportguilded# pip install guilded.pyimportasyncioclient=guilded.Client()channelid=""# the channel you want downtime notifications to be sent to! Make sure your bot has permissions.asyncdefmonitorbot(client:AsyncClient):globaldownbot_name=awaitclient.status().namewhileTrue:check=awaitclient.ping()ifnotcheck:ifnotdown:channel=awaitbot.fetch_channel(channelid)awaitchannel.send(f'{bot_name}is down!')down=Trueifcheckanddown:down=Falsechannel=awaitbot.fetch_channel(channelid)awaitchannel.send(f'{bot_name}is online!')awaitasyncio.sleep(10)@bot.eventasyncdefon_ready():print(f'Ready! Logged in as{bot.user.name}')try:clientexcept:client=AsyncClient(beta=beta,auth_token=authtoken)bot.loop.create_task(monitorbot(client))bot.run('guilded bot token here')DocumentationFor detailed documentation on the EcoNuker API, readhttps://docs.econuker.xyz/For detailed documentation on how to use the EcoNuker-API library, please wait while we write it lol.MethodsA list of methods you can call with either Client or AsyncClient..status()(class StatusData).name(string).status(string).servers(integer).latency(float)._raw(dict).ping()(bool).verify(auth_token)(Union(class Token, False)).authtoken(string).authlevel(string)._raw(dict).fetch_servers()(class ServersResult).count(integer).server_ids(list)._raw(dict).fetch_server(id)(class ServerResult).name(string).id(string).owner(class Owner).name(string).id(string).nick(Union(string, None)).profile(string)._raw(dict).url(Union(string, None)).verified(bool).created_at(integer).timezone(string).slug(Union(string, None)).about(Union(string, None))._raw(dict).fetch_items(hidden=True)(class ItemsResult)._raw(dict).fetch_item(id, name)(class ItemResult).id(string).name(string).rarity(string).description(string).desc(string).aliases(list).price(class ItemPrice).sell(str).buy(str).worth(str)._raw(dict)._price_parts(list) ([sell, buy])._raw(dict)._data(list)LicenseThis project is licensed under the MIT License. See the LICENSE file for details.
Package: econvert
econvertFirst run the following command in a cmd windowpip install econvertThen, Create a new python scriptOpen the scriptImport the modulefromeconvertimporteconvertaseccelsius to fahrenheitec.c_to_f(100)The 100 can be changed to any value you wish to convert
fahrenheit to celsiusec.f_to_c(100)The 100 can be changed to any value you wish to convert
Full codefromeconvertimporteconvertasecf=ec.f_to_c(100)print(f)c=ec.c_to_f(100)print(c)More convertions will be added soon!!
Package: econ-watcher-reader
DataReader for Economy Watcher SurveyData reader for Economy Watcher Survey provided by Cabinet Office of Japan.
Data returned as pandas.DataFrame.
It can get only data providedherenow, but is under developing to expand available data range.DependencyDeveloped in python 3.7.InstallUsagefromecon_watcher_readerimportEconomyWatcherReaderreader=EconomyWatcherReader()data=reader.get_data(kind_='current',start=datetime.datetime(2018,1,1),end=datetime.datetime(2018,5,1))If you want data about future,reader=EconomyWatcherReader()data=reader.get_data(kind_='future',start=datetime.datetime(2018,1,1),end=datetime.datetime(2018,5,1))LicenceMIT LicenseAuthorsYuta SugiuraReferencesData SorceCabinet OfficeEconomy Watcher Survey
Package: ecopad
A tool for padding text to be pasted into text boxes in the game Eco,
working around a client bug on linux, that doubles key presses.Packages needed before installingpython3-tkinterInstallationpip3 install--userecopadUsageLaunch the app with the commandecopad. Alternately, one may add the
option-Lfor 4K monitors.Once the app is open, entering text into the entry field and pressing
return, or clicking the button, will copy the text to clipboard, and pad
it with whitespace if the length is odd numbered. Once pasted inside the
game, one simply deletes the doubled phrase, and submit the text.