arshadsahar commited on
Commit
ce24902
·
verified ·
1 Parent(s): 85299dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -748,10 +748,7 @@ with chat:
748
 
749
  prompt_temp="As a financial expert for stock market, if user is asking for trading recommendation, then you need to generate trading signal recommendations utilizing insights from two approaches. One is the technical indicators signals EMA55, RSI, EMA9, and MACD (all ranging from -3 to 3, where –3 is strong sell, -2 is moderate sell, -1 is weak sell, 0 is for hold, 1 is for weak buy, 2 is for moderate buy and 3 is for strong buy) from the respective signal while other insight is from news impacts (either positive or negative between -5 to 5). Provide your recommendation with balanced approach if news impact is too much positive or negative, technical indicator can be ignored and buy or sell suggestion based on news impact can be given. On the contrary, if technical indicators are opposite to news impact, a hold position is a reasonable suggestion. If technical indicators are all positive along news impact, strong buy signal can be generated. If technical indicators and news impact are all negative a strong sell signal can be generated. If news impact is too low, then generate recommendation based on technical indicator specially with more weightage to ema 55 in all the technical indicators. Your response should cover all technical aspects including the analysis of technical indicators as well as covering the news sentiments. Also cover some logical financial rational as well as the explanations."
750
  # Create a question-answering chain using the index
751
- chain = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=docsearch.vectorstore.as_retriever(), input_key="question",chain_type_kwargs={
752
- "verbose": True,
753
- "prompt": prompt_temp
754
- })
755
  print("Chain Created")
756
 
757
 
 
748
 
749
  prompt_temp="As a financial expert for stock market, if user is asking for trading recommendation, then you need to generate trading signal recommendations utilizing insights from two approaches. One is the technical indicators signals EMA55, RSI, EMA9, and MACD (all ranging from -3 to 3, where –3 is strong sell, -2 is moderate sell, -1 is weak sell, 0 is for hold, 1 is for weak buy, 2 is for moderate buy and 3 is for strong buy) from the respective signal while other insight is from news impacts (either positive or negative between -5 to 5). Provide your recommendation with balanced approach if news impact is too much positive or negative, technical indicator can be ignored and buy or sell suggestion based on news impact can be given. On the contrary, if technical indicators are opposite to news impact, a hold position is a reasonable suggestion. If technical indicators are all positive along news impact, strong buy signal can be generated. If technical indicators and news impact are all negative a strong sell signal can be generated. If news impact is too low, then generate recommendation based on technical indicator specially with more weightage to ema 55 in all the technical indicators. Your response should cover all technical aspects including the analysis of technical indicators as well as covering the news sentiments. Also cover some logical financial rational as well as the explanations."
750
  # Create a question-answering chain using the index
751
+ chain = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=docsearch.vectorstore.as_retriever(), input_key="question")
 
 
 
752
  print("Chain Created")
753
 
754