Skip to content

Commit

Permalink
V2.2.1 (#29)
Browse files Browse the repository at this point in the history
* update version

* clean
  • Loading branch information
TexasCoding authored Jun 18, 2024
1 parent 9642627 commit 6d39d04
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "py-alpaca-daily-losers"
version = "2.1.9"
version = "2.2.1"
description = "Daily Losers strategy, uses py-alpaca-api for Alpaca Markets integration."
authors = ["TexasCoding <[email protected]>"]
license = "MIT"
Expand Down
6 changes: 5 additions & 1 deletion src/alpaca_daily_losers/daily_losers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging
import os
import re

import pandas as pd
from dotenv import load_dotenv
Expand Down Expand Up @@ -204,7 +205,10 @@ def filter_tickers_with_news(
symbol=art["symbol"],
article=art["content"],
)
if sentiment == "BULLISH":

regex = re.compile("[^a-zA-Z]")
clean_sentiment = regex.sub("", sentiment)
if clean_sentiment == "BULLISH":
bullish += 1
else:
bearish += 1
Expand Down
3 changes: 0 additions & 3 deletions src/alpaca_daily_losers/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ def chat(self, msgs):
:param msgs: List of messages
return: OpenAI response
"""
# openai = OpenAI(api_key=self.api_key)
response = self.completion_with_backoff(model="gpt-4o", messages=msgs)
# message = response
print(response)
return response

########################################################
Expand Down

0 comments on commit 6d39d04

Please sign in to comment.