@Hong Jit Ng 类似这种python setup 的问题也可以参考chatgpt,以下是我用你的error message 获得的回复 The error message in the terminal indicates that the `pip` command is not recognized. This typically means that Python and `pip` are not properly installed or configured in your system's PATH. Here are the steps to resolve this issue: 1. **Verify Python Installation**: - Ensure Python is installed on your system. Open a new terminal and type: ```sh python --version ``` - This should display the version of Python installed. If not, you'll need to install Python. 2. **Add Python and Pip to PATH**: - When installing Python, make sure to check the box that says "Add Python to PATH". If you missed this step, you need to manually add Python and `pip` to your system's PATH. - To manually add to PATH: - Open the Start Search, type in "environment variables", and select "Edit the system environment variables". - In the System Properties window, click on the "Environment Variables" button. - In the Environment Variables window, find the `Path` variable in the "System variables" section, and click "Edit". - Add the path to your Python installation (e.g., `C:\Python39\` and `C:\Python39\Scripts\`). - Click OK on all windows to apply the changes. 3. **Install Pip**: - If `pip` is not installed, you can install it manually by downloading `get-pip.py` from [this link](https://bootstrap.pypa.io/get-pip.py). - Open a terminal, navigate to the directory where `get-pip.py` is saved, and run: ```sh python get-pip.py ``` 4. **Verify Pip Installation**: - After installation, verify that `pip` is installed and working by typing: ```sh pip --version ``` - This should display the version of `pip` installed. 5. **Install Required Packages**: - Once `pip` is properly set up, you can install packages using: ```sh pip install requests ```
For excel to do back test , a main challenge is retrieve the exit price. You can use a column to determine exit signal, if got signal put a "Exit" Then the next column is just a copy of close price as reference for the subsequent function Then in the mext column, iluse vlookup to look for future exit price that is triggered with "Exit" signal Vlookup will return thenfirst encounter of lookup hence, the first price thatbis triggered with " Exit" will be returned then you can calculate pnl Hope this help