Closed ashercn97 closed 5 months ago
At what point is it failing before you even see the menu?
So what happens is I will run the CLI thing. Then it asks me what i want to select, so I hit 2. Then, it says it needs a path to a csv so I give it a path. It says its downloading it, then it says it did it and lists the tickers. Then, it gives the error above. Then it asks me again to give a path.
@AidanAlr also ty for getting back to me so quickly!!
No problem I just pushed a new commit that added a default option for the ticker list if your path is not working. Please try to add your list of tickers to symbols.csv and let me know if that fixes it. This project is still a work in progress, apologies.
The project also uses data from yahoo finance so you will need to write the tickers as they appear on that website
@AidanAlr when i leave it blank it works, but then gives this error after being done or almost done downloading:
2024-01-29 18:49:42,134 - ERROR - An error occurred: cannot insert Ticker, already exists
Another thing: is there an option to log in? Currently I think its logged into your account.
Ok I will try and look at this issue later, can you attach your csv file to a comment. To sign in to your ALPACA account, you can add your api details in the account_details.py file
I just used the default one.
I will try to look in detail later, but the bug is not being produced for me so it is a bit hard to debug. It is failing in the analysis executor and hitting this exception. If you can copy and paste the output in your terminal would be helpful. def process_stock_data(symbols_list: List[str]) -> Optional[Tuple[str, str]]: """ Processes stock symbols to find the most suitable pair for analysis. Args: symbols_list (List[str]): List of stock ticker symbols. Returns: Optional[Tuple[str, str]]: Most suitable pair of stocks, or None if no suitable pair is found. """ try: stock_data = StockData(asset_list=symbols_list, bypass_adf_test=False) red_bold_print("Most Suitable Pair: " + stock_data.most_suitable_pair) return stock_data.most_suitable_pair except NoSuitablePairsError: logging.warning("No suitable pairs found. Option to bypass adf_test is available but not recommended (y/n): ") bypass_adf_test = input() if bypass_adf_test.lower() == 'y': stock_data = StockData(asset_list=symbols_list, bypass_adf_test=True) red_bold_print( "Most Suitable Pair: {}, {}".format(stock_data.most_suitable_pair[0], stock_data.most_suitable_pair[1])) return stock_data.most_suitable_pair else: print("There are no suitable pairs and you wont bypass the adf test.") except Exception as e: logging.error(f"An error occurred: {e}")
On 28 Jan 2024, at 19:10, ashercn97 @.***> wrote:
@AidanAlr https://github.com/AidanAlr also ty for getting back to me so quickly!!
— Reply to this email directly, view it on GitHub https://github.com/AidanAlr/Stock-Analysis-Terminal-with-Pairs-Trading-Algorithm/issues/11#issuecomment-1913772609, or unsubscribe https://github.com/notifications/unsubscribe-auth/A23QB2CL3DIZNMONIPLVOHLYQ3SHLAVCNFSM6AAAAABCORI7ICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTG43TENRQHE. You are receiving this because you were mentioned.
I dont know how to fix it lol