Exclude ETF's with no funds flow data from scan result

I’m wanting to exclude ETF’s that have no funds flow data from a scan.

Given there are negative funds flows I’ve tried using ABS() as follows.

// Check if the asset class is an ETF
C1 = MATCHFUNFIELD(FEED=MA, FIELD=Asset Class, FIELDVALUE=ETF); 

// Get the absolute value of the 3-month net flows field, convert negative flows
C2 = ABS(MATCHFUNFIELD(FEED=FD, FIELD=NetFlows3Month));

// Check if the net flows are greater than 0
C3 = (C2 > 0);

// Combine both conditions
C4= C1 and C3; 

// Output the result
C4

I’ve tried various permutations of this script, including not using ABS(), but always get the same result which is the scan includes ETF’s with no 3mth funds flows and excludes EFT’s with 3mth funds flow.

Hi Tim,

This should work to find all ETFs while excluding those without Net Flow data:

C1 = MATCHFUNFIELD(FEED=MA, FIELD=Asset Class, FIELDVALUE=ETF);
C2 = MATCHFUNFIELD(FEED=FD, FIELD=NetFlows3Month, FIELDVALUE=0);
C1 == 1 and C2 == 0

Hi Matthew,

Interesting way to do it but I’m still getting ETF’s with no Net Flows 3 Month.

Tim

Looks like blank values are not registering the same as zeros with the MATCHFUNFIELD() function.

Try this alternative script:

C1 = MATCHFUNFIELD(FEED=MA, FIELD=Asset Class, FIELDVALUE=ETF);
C2 = DATAFIELD(FEED=FD, FIELD=NetFlows3Month, LATESTONLY=True);
C2 > 0 or C2 < 0

When i run this on the ASX, the ETFs with a blank space for Net Fund Flow in your WL are not included in the final results now.

Hi Matthew,

That works, thanks.

Tim