Click here to Login





                                                   Multi-line formula in Ranking system node ..

  0

0
Kiran
2017-06-03 00:31:05


Want to use Earning surprise (from the eCal database populated by Historic Earnings Calendar data source) as a factor in the Ranking System Analyzer.
However, I need to normalize it (using formula below) to reflect same date for after-market and next-day-before-market releases.

How do i enter such a multi-line formula as a node for the Ranking System Analyzer, so i can get the performance buckets in the Ranking System Analyzer?


eS = getdata('earnings_cal', 'surprise', Zero);
eS1 = NantoZero(eS,1);
e_time = GetDataString('earnings_cal', 'etime', '');
amc = stringequal(e_time,"After Market Close");
bmo = stringequal(e_time, "Before Market Open");
eSurprise = ref(eS1,-1)*ref(bmo,-1) + eS1*amc; //

thx
Kiran



QuantShare
2017-06-05 08:37:02

  0

You need to combine everything into a single line:

Example:
a = close > 10;
b = iff(a, 1, 0);

Becomes:
iff(close > 10, 1, 0)



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Super Stock Screener Ranking System
Intraday Trading System with Daily Ranking
RSI(3) Ranking System
Trading System with Sharpe-Based Ranking
Sharpe Ratio Ranking System to Lower Trading Strategies Volatilit...

How-to Lessons
How to optimize an indicator in your trading system
How to set order type of a trading system programmatically
How to optimize the stop limit of a trading system
How to add custom position-based metrics to your trading system
How to add a metric in the trading system simulation report

Related Forum Threads
Ranking System with Trading System Help, Revisited
Variables& Rules in Ranking System
Ranking System - Intraday support
Use of Comp with Full Ranking System
Ranking System & Portfolio Intraday or Realtime data support

Blog Posts
Ranking System Engine
Improve your trading system performance by ranking stocks
Ranking system calculation methods
How to Backtest an Intraday Stock Trading System with EOD Ranking
3 ways to rank stocks in a trading system - Simulator and Potfoli...









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.