Git Product home page Git Product logo

fin-thread's Introduction

Hi there ๐Ÿ‘‹

My name is Sam Gozman, 27yo ๐Ÿ‡ฎ๐Ÿ‡ฑ, speaking in en & ru. I started programming at the age of 12 and have been working full-time as a backend developer since 2016, mainly in the fintech sector. My main programming languages are Golang, TypeScript and Rust. I have been a member of the GitHub open-source community for a long time :)

If you are interested in learning more about me, my OSS projects or reading a dev blog that I've rebuilt recently - I encourage you to visit my website: ๐Ÿ‘จโ€๐Ÿ’ป https://gozman.space

๐Ÿ“ซ How to reach me: Telegram (preferably), Email

๐Ÿ“‡ LinkedIn: in/samgozman

Anurag's GitHub stats Top Langs

fin-thread's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jcl2023

fin-thread's Issues

Fix publication id bug

It contains only a garbage, need to investigate this error and fix or delete this feature.

Investigate duplicated news

84badc84deff37534a92d542feb604d2 & 63ce96d721bc53be01e34fb824331f8c
9776da2fca32fe7dd2f8c4ee28b24156 & 608c24baa1d9994fdd65ae4637fb2ccf

Fix publication duplication

Sometimes publication duplication occurs with same hash id, but different text. Most likely because it was fetched by different feeds, which is odd because there is a duplication check..

For example: 56aeda3ec56755b129d3cd42acde6213 and 54c53458fa323da8bd54e56e89a21655

Maybe it's a deployment issue. Need to save news in DB before publication and update it after (this will raise duplication error quicker)

*fmt.wrapError: [job-calendar] Error fetching events: unknown currency: ALL

Sentry Issue: FIN-THREAD-W

*errors.errorString: unknown currency: ALL
*fmt.wrapError: [job-calendar] Error fetching events: unknown currency: ALL
  File "/app/jobs/calendar.go", line 78, in (*App).start.(*CalendarJob).RunWeeklyCalendarJob.func13.1
  File "/app/jobs/calendar.go", line 48, in (*App).start.(*CalendarJob).RunWeeklyCalendarJob.func13
...
(3 additional frame(s) were not displayed)

To fix weekly calendar job

Fill hashtags programmatically instead of OpenAI

OpenAI generates lots of hallucinated hashtags, they are not production ready and should be used only internally. Examples: a0ed61227f4e4729ddba423208175b47 & 731fcf21192498dbef522918f8fda688

Try to use other ai provider with cheaper models for filtering before OpenAI kicks in

Like https://www.together.ai/ or https://www.anyscale.com/endpoints, because llama and mistral ai can cost 10x cheaper

LLama 70b chat was really good in filtering news with this prompt, but it responded with text also. But with good explanation..

You will be given a JSON array of financial news. You need to remove from array blank, purposeless, clickbait, advertising or non-financial news. Most  important news right know is inflation, interest rates, war, elections, crisis, unemployment index etc.
Return the response in the same JSON format. If none of the news are important, return empty array [].

[{"ID":"1","Title":"This key element of ESG investing could drive real change at companies and boost returns","Description":"As environment and board diversity initiatives have gained broad acceptance, some are now trying to clarify the case for the middle pillar of ESG.","Link":"https://www.cnbc.com/","Date":"2023-11-19T16:48:26.569248+04:00","ProviderName":"cnbc"},{"ID":"2","Title":"Goldman Sachs analysts have increased conviction in these 5 stocks","Description":"Goldman Sachs analysts named a slew of stocks to buy heading into the holiday season.","Link":"https://www.cnbc.com/","Date":"2023-11-19T16:48:26.569248+04:00","ProviderName":"cnbc"},{"ID":"3","Title":"Ray Dalio says U.S. reaching an inflection point where the debt problem quickly gets even worse","Description":"Soaring U.S. government debt is reaching a point where it will begin creating larger problems, the hedge fund titan said Friday.","Link":"https://www.cnbc.com/","Date":"2023-11-19T16:48:26.569248+04:00","ProviderName":"cnbc"},{"ID":"4","Title":"The market thinks the Fed is going to start cutting rates aggressively. Investors could be in for a letdown","Description":"Markets may be at least a tad optimistic, particularly considering the cautious approach central bank officials have taken.","Link":"https://www.cnbc.com/","Date":"2023-11-19T16:48:26.569248+04:00","ProviderName":"cnbc"},{"ID":"5","Title":"Wholesale prices fell 0.5% in October for biggest monthly drop since April 2020","Description":"Wholesale prices fell 0.5% in October for biggest monthly drop since April 2020","Link":"https://www.cnbc.com/","Date":"2023-11-19T16:48:26.569248+04:00","ProviderName":"cnbc"}]

Image

Create daily news summary

Multiple sections:

  1. All previous events
  2. Top news summary
  3. Expected todays events

run summary before market opens.

Add links to the discussed news (use publication id)

Add statistic model

To store how many news fetched, how many published at the selected date. And for future statistics data

Try to find stocks ticker before AI

Some tickers can be found in the text like (NYSE: STOCKNAME), $TLT etc. This could be used further to filter news before sending them to the openAi

[Compose] error in json.Unmarshal: invalid character '"' after object key:value pair for object:

One more probable compose fix, if escalates.

Sentry Issue: FIN-THREAD-8

*errors.errorString: [Job.composeNews][composer.Compose]: [Compose] error in json.Unmarshal: invalid character '"' after object key:value pair for object: [{"id":"98541d11313e9975ce3a9fed62abcd04","text":"China's Consumer Price Index decreased by 0.50 percent in November 2023 compared to the previous month." "tickers":[], "markets":["FXI"], "hashtags":["inflation"]
  File "/app/job.go", line 121, in (*App).start.(*Job).Run.func3
...
(2 additional frame(s) were not displayed)

Fix error: Failed to detect feed type

Sentry Issue: FIN-THREAD-2

*errors.joinError: Provider benzinga:buybacks error: Failed to detect feed type
  File "/app/app.go", line 46, in main.(*App).CreateMarketNewsJob.func1
...
(2 additional frame(s) were not displayed)

Fix error [Job.publish][json.Unmarshal] meta: unexpected end of JSON input

2023/12/22 17:53:39 WARN [Run.BroadNews][publish] error="[Job.publish][json.Unmarshal] meta: unexpected end of JSON input. Value: "

Sentry Issue: FIN-THREAD-D

*errors.errorString: [Job.publish][json.Unmarshal] meta: unexpected end of JSON input. Value: 
  File "/app/jobs/job.go", line 210, in (*App).start.(*Job).Run.func7
...
(1 additional frame(s) were not displayed)

Add struct Job with Run() method as it is

validations, publishers and other stuff should be moved to other methods and chained to the struct. Run() will only have if checks to run specific job or not.
Other features:

  • Should have OmitSuspicious() class to not to publish news with this flag on the early stages (but save them for analysis in some way)
  • Should have OmitEmptyMeta() class to not to publish news with empty meta (after composer event happens). But still save them for analysis.

Maybe there is no need to store all omitted news data in DB, so maybe store only link to it and meta.

Big - Investors Calendar feature

Parse U.S. economic calendar with forecasts and median values. Fore example - https://www.marketwatch.com/economy-politics/calendar?mod=u.s.-economic-calendar (but it's not very useful because of the delay, actual value will be displayed later)

There are lot's of them. Find something reliable.

  1. Parse todays calendar plan
  2. Check for changes starting from the planning time of the report until it will be fetched.
  3. Create automatic posts with it

https://www.mql5.com/en/economic-calendar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.