Description Usage Arguments Value Examples
View source: R/Trade_Decision.R
This function takes as arguments the sentiment indexes and returns the decision.
1 2 3 4 5 6 7 | Trade_Decision(
Current_Sentiment_Index,
Past_Sentiment_Index,
Use_Delta_Sentiment,
Sentiment_Index_Threshold,
past_decision
)
|
Current_Sentiment_Index |
The current sentiment index |
Past_Sentiment_Index |
The sentiment index in (t-1) |
Use_Delta_Sentiment |
If True the fuction will consider the difference in the sentiment index in the decision. |
Sentiment_Index_Threshold |
The threshold to define if the decision will be following or against the sentiment. |
past_decision |
The last trade decision. |
The vector with the decision.
1 2 3 4 5 6 7 8 9 10 11 | buy_sell_t1 <- 0.2
buy_sell_t <- 0.5
Use_Delta_Sentiment <- TRUE
Sentiment_Index_Threshold <- 0.5
decision <- Trade_Decision(Current_Sentiment_Index = buy_sell_t,
Past_Sentiment_Index = buy_sell_t1,
Use_Delta_Sentiment = Use_Delta_Sentiment,
Sentiment_Index_Threshold = Sentiment_Index_Threshold,
past_decision = decision
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.