semvec/pypi-packages huggingface dataset:
parampacmap 0.1.1rc0
Package for Parameterized PaCMAP (ParamRepulsor).
Requires Python: <3.12,>=3.9

# ParamRepulsor

This is the code repository for the NeurIPS 2024 paper "Navigating the Effect of Parametrization for Dimensionality Reduction". Our paper can be found [here](https://openreview.net/pdf?id=eYNYnYle41).

## How to install
This repository can be installed locally via pip by the following command:

```bash
git clone https://github.com/hyhuang00/ParamRepulsor.git
cd ParamRepulsor
pip install .
```

Note: this will not install `torch`, as this is highly platform-dependent.
This project provides optionals:

```bash
pip install .[cpu]    # cpu-only pytorch
pip install .[cu118]  # cuda 118
pip install .[cu121]  # cuda 121
pip install .[cu124]  # cuda 124
pip install .[mps]    # arm64/aarch64 (Apple M-Series chips)
```

This project also supports `uv` (`pip install uv`):

```bash
echo "3.11" > .python-version  # supported: [3.9, 3.12)
uv sync (--extra cpu)  # as appropriate for your system
uv run pytest
TORCH_DEVICE=cpu uv run pytest  # disable accelerator
```

## How to use our algorithm
ParamPaCMAP/ParamRepulsor is fully scikit-learn compatible, meaning that it can be
used as any other scikit-learn based algorithm.
After the installation, you can use our algorithm by:

```python
import parampacmap

# Initialize the reducer. Notice that by default, the stronger paramrepulsor
# algorithm will be used.
reducer = parampacmap.ParamPaCMAP()
X_low = reducer.fit_transform(X)  # Substitute your data here.
```


## Citation
If you have referred to our research in your publication, or you used the ParamRepulsor/ParamPaCMAP algorithm in this repository, please cite our paper using the following bibtex:

```
@inproceedings{huang2024navigating,
  title={Navigating the Effect of Parametrization for Dimensionality Reduction},
  author={Huang, Haiyang and Wang, Yingfan and Rudin, Cynthia},
  booktitle={The Thirty-eighth Annual Conference on Neural Information Processing Systems},
  year={2024},
}
```

## Project Contributor
A full list of project contributors can be found [here](CONTRIBUTORS.md).
stock-picking 0.1.1
A stock-picking system based on Warren Buffett's principles and the Piotroski score.
Requires Python: >=3.9

# Stock Picking System

The **Stock Picking System** is inspired by the investment philosophy outlined in the book *"The New Tao of Warren Buffett"*. This book delves into the mindset of Warren Buffett, one of the most successful investors of all time. It emphasizes key metrics such as **Earnings Per Share (EPS)**, the **current stock price**, and **future growth potential** to evaluate companies.

To illustrate, consider a stock priced at **$100** with an **EPS of $2**. This means for every dollar invested, you make **2 cents** in earnings, which is not as attractive as the returns from fixed bonds or savings accounts. However, the real appeal of such stocks lies in their **growth potential**. This is especially true for **tech stocks**, where investors are willing to overlook lower immediate returns for the possibility of exponential future growth.

This project implements a stock-picking strategy that aims to identify companies with both:

- **High Stock Returns**: Calculated as `EPS / Stock Price`, this ratio highlights companies with strong returns relative to their stock price.
- **High Piotroski Score**: A metric that evaluates a companyâ€™s financial health. A higher Piotroski Score indicates that the stock is financially sound and has better chances of growth.

By combining these two factors, this system helps pinpoint stocks that not only offer strong returns but also have a solid foundation for future success.

---

## Installation

You can easily install the package using pip:

```bash
pip install stock-picking
```

## Usage
### Example 1: Analyze a List of Stocks by Ticker Symbols

You can input a list of stock tickers to analyze and filter based on the Piotroski Score threshold:
```bash
from stock_picking import get_top_stocks

# Example 1
tickers = ["AAPL", "MO", "CINF", "WYNN"]
get_top_stocks(tickers= tickers, exchange='NYSE', piotroski_score_threshold=5, generate_csv=True)
```

### Example 2: Analyze Stocks from a CSV File

If you have a CSV file containing a list of stock tickers, you can pass the file path to the function:
```bash
# Example 2
data_path = "./data/sp_500.csv"
get_top_stocks(tickers = data_path, exchange='NYSE', piotroski_score_threshold=5, generate_csv=True)
```

### Example 3: Analyze Stocks from a DataFrame
If you have the stock data in a DataFrame (e.g., loaded from a CSV), you can directly pass the DataFrame to the function:
```bash
# Example 3
df = pd.read_csv("./data/nifty_50.csv")
get_top_stocks(tickers = df, exchange='NSE', piotroski_score_threshold=5, generate_csv=True)

```

## Contributing
Contributions to improve the stock-picking logic or enhance the functionality of this system are welcome! Feel free to fork the repository, submit issues, or open pull requests with suggestions or improvements.