### Build Long and Short Portfolios with 90-Day History and 30-Day Testing Source: https://github.com/tradytics/eiten/blob/master/README.md This example command constructs both long and short portfolios. It analyzes the last 90 days of daily data, using the first 60 days for portfolio construction and the last 30 days for out-of-sample testing. Performance is compared against the QQQ index. ```Python python portfolio_manager.py --is_test 1 --future_bars 30 --data_granularity_minutes 3600 --history_to_use 90 --apply_noise_filtering 1 --market_index QQQ --only_long 0 --eigen_portfolio_number 3 --stocks_file_path stocks/stocks.txt ``` -------------------------------- ### Install Required Python Packages Source: https://github.com/tradytics/eiten/blob/master/README.md This command installs all necessary Python packages listed in the `requirements.txt` file. These packages, including Scikit-learn, Numpy, Tqdm, Yfinance, Pandas, and Scipy, are essential for running the Eiten toolkit and its various algorithmic strategies. ```Shell pip install -r requirements.txt ``` -------------------------------- ### Build Market Portfolio Without Noise Filtering, Compare with SQQQ Source: https://github.com/tradytics/eiten/blob/master/README.md This example demonstrates building the first eigen portfolio (market portfolio) without applying noise filtering to the covariance matrix. It uses daily data with 90 days for future testing and compares the performance against the SQQQ index. ```Python python portfolio_manager.py --is_test 1 --future_bars 90 --data_granularity_minutes 3600 --history_to_use all --apply_noise_filtering 0 --market_index SQQQ --only_long 1 --eigen_portfolio_number 1 --stocks_file_path stocks/stocks.txt ``` -------------------------------- ### Portfolio Manager Command-Line Interface (CLI) Parameters Source: https://github.com/tradytics/eiten/blob/master/README.md Comprehensive documentation for the command-line arguments of the `portfolio_manager.py` script, used for configuring portfolio building and testing processes. ```APIDOC portfolio_manager.py CLI Parameters: --is_test : Determines if the program reserves separate data for future testing. When enabled, `future_bars` should be > 5. Type: Integer (0 or 1) Constraints: If 1, `future_bars` must be > 5. --future_bars : Number of bars to exclude from portfolio building for out-of-sample forward testing. Type: Integer Constraints: Must be > 0 if `is_test` is 1. --data_granularity_minutes : Granularity of data to use for portfolio construction. Type: Integer Possible Values: 3600 (daily), 60 (hourly), 30, 15, 5, 1 (minutes). --history_to_use : Specifies the amount of historical data to use. Type: String or Integer Possible Values: 'all' (uses all available data from Yahoo Finance), or an integer (e.g., '100' for last 100 bars). --apply_noise_filtering : Enables or disables noise filtering on the covariance matrix using random matrix theory. Type: Integer (0 or 1) Constraints: 1 to enable, 0 to disable. --market_index : The market index to use for comparing portfolio performance. Type: String Examples: 'SPY', 'QQQ', 'SQQQ'. --only_long : Determines whether to build long-only portfolios or allow short selling. Type: Integer (0 or 1) Constraints: 1 for long-only, 0 for long and short. --eigen_portfolio_number : Specifies which eigen portfolio to use. Type: Integer Constraints: 1-5. 1 represents the market portfolio. --stocks_file_path : Path to the file containing the list of stocks for portfolio construction. Type: String Example: 'stocks/stocks.txt' ``` -------------------------------- ### Run Portfolio Manager with Default Test Configuration Source: https://github.com/tradytics/eiten/blob/master/README.md This command executes the `portfolio_manager.py` script to build and test stock portfolios. It uses 5 years of daily historical data, reserving the last 90 days for out-of-sample testing, and compares the portfolio performance against the QQQ market index. ```Python python portfolio_manager.py --is_test 1 --future_bars 90 --data_granularity_minutes 3600 --history_to_use all --apply_noise_filtering 1 --market_index QQQ --only_long 1 --eigen_portfolio_number 3 --stocks_file_path stocks/stocks.txt ``` -------------------------------- ### Build Long-Only Portfolio on 60-Minute Bars with SPY Comparison Source: https://github.com/tradytics/eiten/blob/master/README.md This command builds a long-only portfolio using all available 60-minute bar data. It does not perform future testing and compares the results against the SPY market index instead of QQQ. ```Python python portfolio_manager.py --is_test 0 --future_bars 0 --data_granularity_minutes 60 --history_to_use all --apply_noise_filtering 1 --market_index SPY --only_long 1 --eigen_portfolio_number 3 --stocks_file_path stocks/stocks.txt ``` -------------------------------- ### Execute Portfolio Optimization Script with Custom Parameters Source: https://github.com/tradytics/eiten/blob/master/README.md This command runs the `portfolio_manager.py` script to generate portfolio weights and perform testing based on various strategies. It allows users to customize parameters such as enabling test mode, setting the number of future bars for forward testing, data granularity, historical data usage, applying noise filtering, defining the market index, restricting to long positions, selecting a specific eigen portfolio, and providing the path to the stocks file. This enables flexible configuration of the portfolio generation and testing process. ```python python portfolio_manager.py --is_test 1 --future_bars 90 --data_granularity_minutes 3600 --history_to_use all --apply_noise_filtering 1 --market_index QQQ --only_long 1 --eigen_portfolio_number 3 --stocks_file_path stocks/stocks.txt ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.