https://github.com/anuragagrawaal/pyportfolioanalysis
'Portfolio Analysis, methods for portfolio optimization'
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 12 DOI reference(s) in README -
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.3%) to scientific vocabulary
Keywords
Repository
'Portfolio Analysis, methods for portfolio optimization'
Basic Info
Statistics
- Stars: 23
- Watchers: 1
- Forks: 4
- Open Issues: 1
- Releases: 0
Topics
Metadata Files
README.md
pyPortfolioAnalysis
pyPortfolioAnalysis is a Python library for numeric method for portfolio optimisation.
Installation
Use the package manager pip to install pyPortfolioAnalysis.
Documentation is available as docstring, HTML or Text
bash
pip install pyPortfolioAnalysis
Usage
```python from pyPortfolioAnalysis import * import pandas as pd
Sample portfolio optimisation
import pandasdatareader as pdr aapl = pdr.getdatayahoo('AAPL') msft = pdr.getdatayahoo('MSFT') tsla = pdr.getdatayahoo('TSLA') uber = pdr.getdatayahoo('UBER') amzn = pdr.getdatayahoo('AMZN') port = pd.DataFrame({'aapl': pd.DataFrame.resetindex(aapl).iloc[:,6], 'msft':pd.DataFrame.resetindex(msft).iloc[:,6], 'tsla': pd.DataFrame.resetindex(tsla).iloc[:,6], 'uber': pd.DataFrame.resetindex(uber).iloc[:,6], 'amzn': pd.DataFrame.resetindex(amzn).iloc[:,6]}) portret = port.pctchange().dropna() p1 = portfoliospec(assets = ['AAPL', 'MSFT', 'TSLA', 'UBER', 'AMZN']) addconstraint(p1, 'longonly') addconstraint(p1, 'fullinvestment') addobjective(p1, kind='return', name = 'mean', target = 0.002) addobjective(p1, kind='risk', name = 'std', target = .018) p1.portsummary() constraints = getconstraints(p1) p1.portsummary()
optimizeportfolio(portret, p1, optimize_method = 'DEoptim', disp = False) ```
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Authors
Anurag Agrawal
License
References
Brian G. Peterson and Peter Carl (2018). PortfolioAnalytics: Portfolio Analysis, Including Numerical Methods for Optimization of Portfolios. R package version 1.1.0. https://CRAN.R-project.org/package=PortfolioAnalytics
Boudt, Kris and Lu, Wanbo and Peeters, Benedict, Higher Order Comoments of Multifactor Models and Asset Allocation (June 16, 2014). Available at SSRN: http://ssrn.com/abstract=2409603 or http://dx.doi.org/10.2139/ssrn.2409603
Chriss, Neil A and Almgren, Robert, Portfolios from Sorts (April 27, 2005). Available at SSRN: http://ssrn.com/abstract=720041 or http://dx.doi.org/10.2139/ssrn.720041
Meucci, Attilio, The Black-Litterman Approach: Original Model and Extensions (August 1, 2008). Shorter version in, THE ENCYCLOPEDIA OF QUANTITATIVE FINANCE, Wiley, 2010. Avail- able at SSRN: http://ssrn.com/abstract=1117574 or http://dx.doi.org/10.2139/ssrn.1117574
Meucci, Attilio, Fully Flexible Views: Theory and Practice (August 8, 2008). Fully Flexible Views: Theory and Practice, Risk, Vol. 21, No. 10, pp. 97-102, October 2008. Available at SSRN: http://ssrn.com/abstract=1213325
Scherer, Bernd and Martin, Doug, Modern Portfolio Optimization. Springer. 2005.
Shaw, William Thornton, Portfolio Optimization for VAR, CVaR, Omega and Utility with General Return Distributions: A Monte Carlo Approach for Long-Only and Bounded Short Portfolios with Optional Robustness and a Simplified Approach to Covariance Matching (June 1, 2011). Available at SSRN: http://ssrn.com/abstract=1856476 or http://dx.doi.org/10.2139/ssrn.1856476
Owner
- Name: Anurag Agrawal
- Login: anuragagrawaal
- Kind: user
- Location: Bangalore, India
- Company: Morningstar, Inc
- Website: https://agrawalanurag1999.wixsite.com/matrixfinance-1
- Twitter: anuragagrawaal
- Repositories: 1
- Profile: https://github.com/anuragagrawaal
Passionately analyse financial markets, build algorithms for trading; interest in Quantitative Analysis; Derivatives Pricing; Portfolio Management/Analysis.
GitHub Events
Total
- Issues event: 1
- Watch event: 1
Last Year
- Issues event: 1
- Watch event: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 3
- Total pull requests: 1
- Average time to close issues: about 3 hours
- Average time to close pull requests: about 3 hours
- Total issue authors: 2
- Total pull request authors: 1
- Average comments per issue: 0.33
- Average comments per pull request: 1.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Ashish0804 (2)
- c-vision (1)
- mohmmedaasim (1)
Pull Request Authors
- Ashish0804 (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 7 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 4
- Total maintainers: 1
pypi.org: pyportfolioanalysis
Portfolio Analysis, methods for portfolio optimization
- Homepage: https://github.com/anuragagrawaal/pyPortfolioAnalysis
- Documentation: https://pyportfolioanalysis.readthedocs.io/
- License: GPL3
-
Latest release: 1.0.2
published about 5 years ago
Rankings
Maintainers (1)
Dependencies
- matplotlib *
- numpy *
- pandas *
- pyswarms *
- pyyaml *
- scipy *
- matplotlib ==3.3.1
- numpy ==1.19.2
- pandas ==1.1.2
- pyswarms ==1.2.0
- scipy ==1.5.2
